public class DefaultStringCodec extends Object implements Codec<String>
String.getBytes(Charset)
and String.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 |
---|---|
static Charset |
DEFAULT_CHARSET
Default supported character set is UTF-8
|
Constructor and Description |
---|
DefaultStringCodec() |
DefaultStringCodec(Charset charset) |
Modifier and Type | Method and Description |
---|---|
String |
decode(byte[] bytes) |
byte[] |
encode(String value) |
boolean |
supports(Class<?> type) |
public static final Charset DEFAULT_CHARSET
public DefaultStringCodec()
public DefaultStringCodec(Charset charset)
charset
- public String decode(byte[] bytes)
Copyright © 2009–2017. All rights reserved.