public class DefaultStringCodec extends java.lang.Object implements Codec<java.lang.String>
String.getBytes(Charset) and String(byte[], Charset)
wrapper, and of course you can get to set the Charset if the default UTF-8 Charset is
not to your liking.| Modifier and Type | Field and Description |
|---|---|
private java.nio.charset.Charset |
charSet |
static java.nio.charset.Charset |
DEFAULT_CHARSET
Default supported character set is UTF-8
|
| Constructor and Description |
|---|
DefaultStringCodec() |
DefaultStringCodec(java.nio.charset.Charset charset) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
decode(byte[] bytes) |
byte[] |
encode(java.lang.String value) |
boolean |
supports(java.lang.Class<?> type) |
public static final java.nio.charset.Charset DEFAULT_CHARSET
private final java.nio.charset.Charset charSet
public DefaultStringCodec()
public DefaultStringCodec(java.nio.charset.Charset charset)
charset -