public class Utf8Codec extends JavaUtf8Codec
This is different to Java UTF-8 in that in Standard UTF-8 the null character 0x0000 is converted to a zero byte value, where as in Java UTF-8 the zero byte value is converted into the two byte sequence 0xC0 0x80.
Modifier and Type | Class and Description |
---|---|
static class |
TextCodecObject.InsertStripCRIndexes |
Modifier and Type | Field and Description |
---|---|
static int |
ADD_CR_ALWAYS
This is a creation option.
|
static int |
ADD_CR_PLATFORM_DEPENDENT
This is a creation option to be used with either of the other ADD_CR_XXX options.
|
static int |
ADD_CR_SMART
This is a creation option.
|
STRIP_CR, STRIP_CR_ON_DECODE, STRIP_CR_ON_ENCODE
Modifier and Type | Method and Description |
---|---|
Object |
getCopy()
This should return a new instance of the TextCodec, ready to begin converting a new set of
data.
|
protected TextCodecObject.InsertStripCRIndexes |
insertStripCR(char[] src,
int offset,
int length) |
static boolean |
platformUsesCRforNewLine()
Return true if the underlying platform uses CR with a new line.
|
closeCodec, decodeText, encodeText, reset
public static final int ADD_CR_SMART
public static final int ADD_CR_ALWAYS
public static final int ADD_CR_PLATFORM_DEPENDENT
public Object getCopy()
TextCodec
public static boolean platformUsesCRforNewLine()
protected TextCodecObject.InsertStripCRIndexes insertStripCR(char[] src, int offset, int length)