public class StringBytes extends Object implements Serializer<String>
Converts between String objects and US-ASCII byte arrays. Only supports 7-bit ASCII characters.
Note: Use only when data is guaranteed to contain only US-ASCII.
For Unicode text, use UTF8StringBytes instead.
If string contains characters outside US-ASCII range, an Error is thrown.
| Constructor and Description |
|---|
StringBytes() |
public String construct(byte[] b)
construct in interface Serializer<String>public byte[] getBytes(String o)
getBytes in interface Serializer<String>