|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arunta.base.util.DBCodec
public class DBCodec
String encoder and decoder.
Constructor Summary | |
---|---|
DBCodec()
|
Method Summary | |
---|---|
static java.lang.String |
bareBonesDecode(java.lang.String s)
Decodes a x-www-form-urlencoded string that does not
include the encoded tag. |
static java.lang.String |
bareBonesEncode(java.lang.String s)
Translates a string into encoded format, but doesn't include the encoded tag. |
static java.lang.String |
decode(java.lang.String s)
Decodes a x-www-form-urlencoded string that includes the
encoded tag. |
static java.lang.String |
decode(java.lang.String s,
java.lang.String enc)
Decodes a application/x-www-form-urlencoded string using a
specific encoding scheme. |
static java.lang.String |
encode(java.lang.String s)
Translates a string into encoded format and include the encoded tag. |
static java.lang.String |
encode(java.lang.String s,
java.lang.String enc)
Translates a string into encoded format using a specific encoding scheme. |
static boolean |
isEncoded(java.lang.String s)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBCodec()
Method Detail |
---|
public static boolean isEncoded(java.lang.String s)
public static java.lang.String encode(java.lang.String s)
s
- The String
to be translated.
String
.public static java.lang.String decode(java.lang.String s)
x-www-form-urlencoded
string that includes the
encoded tag.
The platform's default encoding is used to determine what characters are
represented by any consecutive sequences of the form "
%xy
".
s
- The String
to decode
String
public static java.lang.String bareBonesEncode(java.lang.String s)
s
- The String
to be translated.
String
.public static java.lang.String bareBonesDecode(java.lang.String s)
x-www-form-urlencoded
string that does not
include the encoded tag.
The platform's default encoding is used to determine what characters are
represented by any consecutive sequences of the form "
%xy
".
s
- The String
to decode
String
public static java.lang.String encode(java.lang.String s, java.lang.String enc) throws java.io.UnsupportedEncodingException
The supplied encoding is used to determine what characters are
represented by any consecutive sequences of the form "
%xy
".
Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites.
s
- The String
to encodeenc
- The name of a supported
character encoding.
String
java.io.UnsupportedEncodingException
- If the named encoding is not supportedpublic static java.lang.String decode(java.lang.String s, java.lang.String enc) throws java.io.UnsupportedEncodingException
application/x-www-form-urlencoded
string using a
specific encoding scheme.
The supplied encoding is used to determine what characters are
represented by any consecutive sequences of the form "
%xy
".
Note: The World Wide Web Consortium Recommendation states that UTF-8 should be used. Not doing so may introduce incompatibilites.
s
- The String
to decodeenc
- The name of a supported
character encoding.
String
java.io.UnsupportedEncodingException
- If the named encoding is not supported
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |