-
public interface ContentEncodingSchemeEncoding scheme of the content of the JSON string.- Author:
- leadpony
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanDecode(String src)Checks whether the specified string is encoded in this scheme or not.byte[]decode(String src)Decodes the encoded string into a newly allocated byte array using this encoding scheme.Stringname()Returns the name of this encoding scheme.
-
-
-
Method Detail
-
name
String name()
Returns the name of this encoding scheme.- Returns:
- the name of this encoding scheme, cannot be
null.
-
canDecode
boolean canDecode(String src)
Checks whether the specified string is encoded in this scheme or not.- Parameters:
src- the string to check.- Returns:
trueif the specifiedsrcis encoded in this scheme,falseotherwise.- Throws:
NullPointerException- if the specifiedsrcisnull.
-
decode
byte[] decode(String src)
Decodes the encoded string into a newly allocated byte array using this encoding scheme.- Parameters:
src- the string to decode.- Returns:
- newly allocated byte array containing the decoded bytes.
- Throws:
NullPointerException- if the specifiedsrcisnull.IllegalArgumentException- if the specifiedsrccannot be decoded.
-
-