org.apache.commons.httpclient.util
Class URIUtil.Coder
- URIUtil
- Cloneable, Comparable, Serializable
protected static class URIUtil.Coder
The basic and internal utility for URI escape and character encoding and
decoding.
IPv4address , IPv6address , IPv6reference , URI_reference , _authority , _fragment , _host , _is_IPv4address , _is_IPv6reference , _is_abs_path , _is_hier_part , _is_hostname , _is_net_path , _is_opaque_part , _is_reg_name , _is_rel_path , _is_server , _opaque , _path , _port , _query , _scheme , _uri , _userinfo , abs_path , absoluteURI , allowed_IPv6reference , allowed_abs_path , allowed_authority , allowed_fragment , allowed_host , allowed_opaque_part , allowed_query , allowed_reg_name , allowed_rel_path , allowed_userinfo , allowed_within_authority , allowed_within_path , allowed_within_query , allowed_within_userinfo , alpha , alphanum , authority , control , defaultDocumentCharset , defaultDocumentCharsetByLocale , defaultDocumentCharsetByPlatform , defaultProtocolCharset , delims , digit , disallowed_opaque_part , disallowed_rel_path , domainlabel , escaped , fragment , hash , hex , hier_part , host , hostname , hostport , mark , net_path , opaque_part , param , path , path_segments , pchar , percent , port , protocolCharset , query , reg_name , rel_path , rel_segment , relativeURI , reserved , rootPath , scheme , segment , server , space , toplabel , unreserved , unwise , uric , uric_no_slash , userinfo , within_userinfo |
static String | decode(char[] escapedComponent, String charset) - use org.apache.commons.codec.net.URLCodec
|
static char[] | encode(String unescapedComponent, BitSet allowed, String charset) - use org.apache.commons.codec.net.URLCodec
|
static String | replace(String original, char from, char to) - Replace from a given character to given character for a given string.
|
static String | replace(String original, char[] from, char[] to) - Replace from a given character to given character in an array order
for a given string.
|
static boolean | verifyEscaped(char[] original) - Verify whether a given string is escaped or not
|
clone , compareTo , decode , decode , encode , equals , equals , getAboveHierPath , getAuthority , getCurrentHierPath , getDefaultDocumentCharset , getDefaultDocumentCharsetByLocale , getDefaultDocumentCharsetByPlatform , getDefaultProtocolCharset , getEscapedAboveHierPath , getEscapedAuthority , getEscapedCurrentHierPath , getEscapedFragment , getEscapedName , getEscapedPath , getEscapedPathQuery , getEscapedQuery , getEscapedURI , getEscapedURIReference , getEscapedUserinfo , getFragment , getHost , getName , getPath , getPathQuery , getPort , getProtocolCharset , getQuery , getRawAboveHierPath , getRawAuthority , getRawCurrentHierPath , getRawCurrentHierPath , getRawFragment , getRawHost , getRawName , getRawPath , getRawPathQuery , getRawQuery , getRawScheme , getRawURI , getRawURIReference , getRawUserinfo , getScheme , getURI , getURIReference , getUserinfo , hasAuthority , hasFragment , hasQuery , hasUserinfo , hashCode , indexFirstOf , indexFirstOf , indexFirstOf , indexFirstOf , isAbsPath , isAbsoluteURI , isHierPart , isHostname , isIPv4address , isIPv6reference , isNetPath , isOpaquePart , isRegName , isRelPath , isRelativeURI , isServer , normalize , normalize , parseAuthority , parseUriReference , prevalidate , readObject , removeFragmentIdentifier , resolvePath , setDefaultDocumentCharset , setDefaultProtocolCharset , setEscapedAuthority , setEscapedFragment , setEscapedPath , setEscapedQuery , setFragment , setPath , setQuery , setRawAuthority , setRawFragment , setRawPath , setRawQuery , setURI , toString , validate , validate , writeObject |
decode
public static String decode(char[] escapedComponent,
String charset)
throws URIException
use org.apache.commons.codec.net.URLCodec
Unescape and decode a given string.
- decode in interface URI
escapedComponent
- an being-unescaped componentcharset
- the charset to decode
- the escaped and encoded string
encode
public static char[] encode(String unescapedComponent,
BitSet allowed,
String charset)
throws URIException
use org.apache.commons.codec.net.URLCodec
Escape and encode a given string with allowed characters not to be
escaped.
- encode in interface URI
unescapedComponent
- an unescaped componentallowed
- allowed characters not to be escapedcharset
- the charset to encode
- the escaped and encoded string
replace
public static String replace(String original,
char from,
char to)
Replace from a given character to given character for a given string.
original
- a given stringfrom
- a replacing character arrayto
- a replaced character array
replace
public static String replace(String original,
char[] from,
char[] to)
Replace from a given character to given character in an array order
for a given string.
original
- a given stringfrom
- a replacing character arrayto
- a replaced character array
verifyEscaped
public static boolean verifyEscaped(char[] original)
Verify whether a given string is escaped or not
original
- given characters
- true if the given character array is 7 bit ASCII-compatible.
Copyright (c) 1999-2005 - Apache Software Foundation