|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ihr.xbrl.util.URITools
public class URITools
| Constructor Summary | |
|---|---|
URITools()
|
|
| Method Summary | |
|---|---|
static boolean |
areSameUri(java.net.URI uri1,
java.net.URI uri2)
|
static java.lang.String |
decodeUri(java.lang.String uri)
Decodes a string according to RFC 2396. |
static void |
decodeUri(java.lang.String uri,
java.lang.StringBuffer buf)
Decodes a string according to RFC 2396. |
static java.lang.String |
encodeUri(java.lang.String uri)
Encodes a string according to RFC 2396. |
static void |
encodeUri(java.lang.String uri,
java.lang.StringBuffer buf)
Encodes a string according to RFC 2396. |
static java.net.URI |
fixEndWithSlash(java.lang.String uri)
Creates an URI that ends with a slash character '/' if the input string in the uri parameter does not ends with the slash character. |
static java.lang.String |
fixFileSchemeURIToString(java.net.URI uri)
If the URI passed in as a parameter is of the file: scheme, then toString does not return file:/// but file:/ This seems to be incorrect so this method just fix this. |
static java.net.URI |
getDetectIsURIOrFile(java.lang.String fileString)
Detects if the input string is a file uri, a remote uri or a local file name and returns a uri pointing to the target. |
static java.net.URI |
getNormalURI(java.net.URI sinonimURI)
|
static java.net.URI |
makeAbsolute(java.net.URI base,
java.net.URI uri)
|
static java.lang.String |
packURI(java.lang.String uri,
int maxLength)
Takes a string representation of an URI and packs it to a maximum length of maxLenght characters. |
static java.net.URI |
relativize(java.net.URI base,
java.net.URI full)
Creates a new URI that contains a path relative to the base URI. |
static java.net.URI |
relativizeMore(java.net.URI from,
java.net.URI to)
Computes a relative path from the URI in the from argument to the URI in the to argument This function does not work if the incoming parameters contain several slashes together ie (file:/C:/hello////this%20is%20a%20test) |
static java.net.URI |
removeFragment(java.net.URI uri)
|
static java.net.URI |
URLtoFileName(java.net.URL u)
This function transforms a URL of the form file:/C:/Program Files/svs/xbrljlib-2.0.jar into a proper file URI to be used as a parameter for the File(URI) method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public URITools()
| Method Detail |
|---|
public static java.net.URI getNormalURI(java.net.URI sinonimURI)
public static boolean areSameUri(java.net.URI uri1,
java.net.URI uri2)
public static java.net.URI makeAbsolute(java.net.URI base,
java.net.URI uri)
public static java.net.URI relativize(java.net.URI base,
java.net.URI full)
base - URIfull - URI
public static java.net.URI relativizeMore(java.net.URI from,
java.net.URI to)
from - URI Absolute URIto - URI Absolute URI
public static java.net.URI removeFragment(java.net.URI uri)
public static java.lang.String encodeUri(java.lang.String uri)
uri - The URI to encode.
public static void encodeUri(java.lang.String uri,
java.lang.StringBuffer buf)
uri - The URI to encode.buf - The StringBuffer that the encoded URI will be appended to.encodeUri(java.lang.String)public static java.lang.String decodeUri(java.lang.String uri)
uri - The URI to decode.
public static void decodeUri(java.lang.String uri,
java.lang.StringBuffer buf)
uri - The URI to decode.buf - The StringBuffer that the decoded URI will be appended to.decodeUri(java.lang.String)
public static java.lang.String packURI(java.lang.String uri,
int maxLength)
uri - maxLength -
public static java.net.URI URLtoFileName(java.net.URL u)
u -
public static java.lang.String fixFileSchemeURIToString(java.net.URI uri)
uri -
public static java.net.URI getDetectIsURIOrFile(java.lang.String fileString)
throws java.net.URISyntaxException
if the string starts with file: this is a local file uri. if the string starts with http: this is a remote file uri. if the string contains no scheme, then threat it as a local file in the local directory.
confFileText -
java.net.URISyntaxException
public static java.net.URI fixEndWithSlash(java.lang.String uri)
throws java.net.URISyntaxException
uri - the input string to create a uri from
java.net.URISyntaxException - in case the URI raises this exception when it is created
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||