|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.vfs2.provider.UriParser
public final class UriParser
Utilities for dealing with URIs. See RFC 2396 for details.
| Field Summary | |
|---|---|
static char |
TRANS_SEPARATOR
The set of valid separators. |
| Method Summary | |
|---|---|
static void |
appendEncoded(StringBuilder buffer,
String unencodedValue,
char[] reserved)
Encodes and appends a string to a StringBuilder. |
static void |
canonicalizePath(StringBuilder buffer,
int offset,
int length,
FileNameParser fileNameParser)
|
static void |
checkUriEncoding(String uri)
Decodes the String. |
static String |
decode(String encodedStr)
Removes %nn encodings from a string. |
static void |
decode(StringBuilder buffer,
int offset,
int length)
Removes %nn encodings from a string. |
static String |
encode(String decodedStr)
Removes %nn encodings from a string. |
static String[] |
encode(String[] strings)
Encode an array of Strings. |
static void |
encode(StringBuilder buffer,
int offset,
int length,
char[] reserved)
Encodes a set of reserved characters in a StringBuilder, using the URI %nn encoding. |
static String |
encode(String decodedStr,
char[] reserved)
Converts "special" characters to their %nn value. |
static String |
extractFirstElement(StringBuilder name)
Extracts the first element of a path. |
static String |
extractQueryString(StringBuilder name)
Extract the query String from the URI. |
static String |
extractScheme(String uri)
Extracts the scheme from a URI. |
static String |
extractScheme(String uri,
StringBuilder buffer)
Extracts the scheme from a URI. |
static boolean |
fixSeparators(StringBuilder name)
Normalises the separators in a name. |
static FileType |
normalisePath(StringBuilder path)
Normalises a path. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final char TRANS_SEPARATOR
| Method Detail |
|---|
public static String extractFirstElement(StringBuilder name)
name - StringBuilder containing the path.
public static FileType normalisePath(StringBuilder path)
throws FileSystemException
path - The path to normalize.
FileSystemException - if an error occurs.fixSeparators(java.lang.StringBuilder)public static boolean fixSeparators(StringBuilder name)
name - The StringBuilder containing the name
public static String extractScheme(String uri)
uri - The URI.
public static String extractScheme(String uri,
StringBuilder buffer)
uri - The URI.buffer - Returns the remainder of the URI.
public static String decode(String encodedStr)
throws FileSystemException
encodedStr - The encoded String.
FileSystemException - if an error occurs.
public static void decode(StringBuilder buffer,
int offset,
int length)
throws FileSystemException
buffer - StringBuilder containing the string to decode.offset - The position in the string to start decoding.length - The number of characters to decode.
FileSystemException - if an error occurs.
public static void appendEncoded(StringBuilder buffer,
String unencodedValue,
char[] reserved)
buffer - The StringBuilder to append to.unencodedValue - The String to encode and append.reserved - characters to encode.
public static void encode(StringBuilder buffer,
int offset,
int length,
char[] reserved)
buffer - The StringBuilder to append to.offset - The position in the buffer to start encoding at.length - The number of characters to encode.reserved - characters to encode.public static String encode(String decodedStr)
decodedStr - The decoded String.
public static String encode(String decodedStr,
char[] reserved)
decodedStr - The decoded String.reserved - Characters to encode.
public static String[] encode(String[] strings)
strings - The array of Strings to encode.
public static void checkUriEncoding(String uri)
throws FileSystemException
uri - The String to decode.
FileSystemException - if an error occurs.
public static void canonicalizePath(StringBuilder buffer,
int offset,
int length,
FileNameParser fileNameParser)
throws FileSystemException
FileSystemExceptionpublic static String extractQueryString(StringBuilder name)
name - StringBuilder containing the URI.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||