| org.archive.net.LaxURLCodec
LaxURLCodec | public class LaxURLCodec extends URLCodec (Code) | | author: gojomo |
Method Summary | |
final public static byte[] | decodeUrlLoose(byte[] bytes) Decodes an array of URL safe 7-bit characters into an array of
original bytes. | public String | encode(BitSet safe, String pString, String cs) Encodes a string into its URL safe form using the specified
string charset. |
EXPANDED_URI_SAFE | public static BitSet EXPANDED_URI_SAFE(Code) | | A more expansive set of ASCII URI characters to consider as 'safe' to
leave unencoded, based on actual browser behavior.
|
decodeUrlLoose | final public static byte[] decodeUrlLoose(byte[] bytes)(Code) | | Decodes an array of URL safe 7-bit characters into an array of
original bytes. Escaped characters are converted back to their
original representation.
Differs from URLCodec.decodeUrl() in that it throws no
exceptions; bad or incomplete escape sequences are ignored
and passed into result undecoded. This matches the behavior
of browsers, which will use inconsistently-encoded URIs
in HTTP request-lines.
Parameters: bytes - array of URL safe characters array of original bytes |
encode | public String encode(BitSet safe, String pString, String cs) throws UnsupportedEncodingException(Code) | | Encodes a string into its URL safe form using the specified
string charset. Unsafe characters are escaped.
This method is analogous to superclass encode() methods,
additionally offering the ability to specify a different
'safe' character set (such as EXPANDED_URI_SAFE).
Parameters: safe - BitSet of characters that don't need to be encoded Parameters: pString - String to encode Parameters: cs - Name of character set to use Encoded version of pString . throws: UnsupportedEncodingException - |
|
|