|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sibvisions.util.type.CodecUtil
public final class CodecUtil
The CodecUtil contains methods for encode and decode operations.
| Method Summary | |
|---|---|
static java.lang.String |
decodeHex(java.lang.String pHex)
Decodes a hex, utf-8 encoded text to a string. |
static byte[] |
decodeHexAsBytes(java.lang.String pHex)
Decodes a hex, utf-8 encoded text to a string. |
static java.lang.String |
decodeHtml(java.lang.String pHtml)
Encodes raw html to text. |
static java.lang.String |
decodeURLParameter(java.lang.String pValue)
Decodes an encoded value from an URL query parameter with ISO-8859-1. |
static java.lang.String |
decodeURLParameter(java.lang.String pValue,
java.lang.String pEncoding)
Decodes an encoded value from an URL query parameter with a specific charset. |
static java.lang.String |
decodeURLPart(java.lang.String pURL)
Decodes the part of an URL with UTF-8. |
static java.lang.String |
encodeHex(byte[] pContent)
Encodes a list of bytes to a hex encoded string. |
static java.lang.String |
encodeHex(java.io.InputStream pStream)
Encodes a stream to a hex encoded string. |
static java.lang.String |
encodeHex(java.lang.String pText)
Encodes a text to a hex encoded string. |
static java.lang.String |
encodeHtml(java.lang.String pText)
Encodes a text to raw html. |
static java.lang.String |
encodeURLParameter(java.lang.String pValue)
Encodes a plain value for an URL query parameter with ISO-8859-1. |
static java.lang.String |
encodeURLParameter(java.lang.String pValue,
java.lang.String pEncoding)
Encodes a plain value for an URL query parameter with a specific charset. |
static java.lang.String |
encodeURLPart(java.lang.String pPart)
Encodes the part for an URL with UTF-8 encoding. |
static java.lang.String |
encodeURLPart(java.lang.String pPart,
java.lang.String pEncoding)
Encodes the part for an URL with UTF-8 encoding. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String encodeURLPart(java.lang.String pPart)
pPart - the url part
public static java.lang.String encodeURLPart(java.lang.String pPart,
java.lang.String pEncoding)
pPart - the url partpEncoding - the encoding
public static java.lang.String encodeURLParameter(java.lang.String pValue)
pValue - the plain query parameter value
null if ISO-8859-1 is not supported
public static java.lang.String encodeURLParameter(java.lang.String pValue,
java.lang.String pEncoding)
pValue - the plain query parameter valuepEncoding - the charset e.g. UTF-8
null if pEncoding is not supportedpublic static java.lang.String decodeURLPart(java.lang.String pURL)
pURL - the url part
public static java.lang.String decodeURLParameter(java.lang.String pValue)
pValue - the encoded query parameter value
null if ISO-8859-1 is not supported
public static java.lang.String decodeURLParameter(java.lang.String pValue,
java.lang.String pEncoding)
pValue - the encoded query parameter valuepEncoding - the charset e.g. UTF-8
null if pEncoding is not supportedpublic static java.lang.String encodeHtml(java.lang.String pText)
pText - the text
public static java.lang.String decodeHtml(java.lang.String pHtml)
pHtml - the html code
public static java.lang.String encodeHex(java.lang.String pText)
throws java.io.UnsupportedEncodingException
pText - the plain text
java.io.UnsupportedEncodingException - if utf-8 encoding is not supportedpublic static java.lang.String encodeHex(byte[] pContent)
pContent - the list of bytes
public static java.lang.String encodeHex(java.io.InputStream pStream)
throws java.io.IOException
pStream - the stream
java.io.IOException - if stream reading fails
public static java.lang.String decodeHex(java.lang.String pHex)
throws java.io.UnsupportedEncodingException
pHex - the decoded text
java.io.UnsupportedEncodingException - if utf-8 encoding is not supported
public static byte[] decodeHexAsBytes(java.lang.String pHex)
throws java.io.UnsupportedEncodingException
pHex - the decoded text
java.io.UnsupportedEncodingException - if utf-8 encoding is not supported
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||