public class Utf16LE extends Object implements ComplexEncoding
Modifier and Type | Field and Description |
---|---|
static int |
MAX_CHAR |
Constructor and Description |
---|
Utf16LE() |
Modifier and Type | Method and Description |
---|---|
CodePointBuffer |
decode(ByteBuffer text,
CodePointBuffer buffer) |
CodePointBuffer |
decode(ByteBuffer text,
CodePointBuffer buffer,
EncodingErrorType errorHandling) |
CodePointBuffer |
decode(char[] chars,
int offset,
int length,
CodePointBuffer buffer) |
CodePointBuffer |
decodeString(String text,
CodePointBuffer buffer) |
ByteBuffer |
encode(CodePointBuffer text,
ByteBuffer buffer)
Encode, but ignore errors.
|
ByteBuffer |
encode(CodePointBuffer text,
ByteBuffer buffer,
EncodingErrorType errorHandling) |
String |
encodeString(CodePointBuffer buffer) |
static Utf16LE |
getInstance() |
String |
getName() |
String |
getName(Locale locale) |
boolean |
isEncodingSupported()
Checks, whether this implementation supports encoding of character data.
|
boolean |
isUnicodeCharacterSupported(int c) |
public static final int MAX_CHAR
public static Utf16LE getInstance()
public boolean isUnicodeCharacterSupported(int c)
isUnicodeCharacterSupported
in interface EncodingCore
public ByteBuffer encode(CodePointBuffer text, ByteBuffer buffer)
encode
in interface EncodingCore
text
- buffer
- public CodePointBuffer decode(ByteBuffer text, CodePointBuffer buffer)
decode
in interface EncodingCore
public ByteBuffer encode(CodePointBuffer text, ByteBuffer buffer, EncodingErrorType errorHandling) throws EncodingException
encode
in interface EncodingCore
EncodingException
public CodePointBuffer decode(ByteBuffer text, CodePointBuffer buffer, EncodingErrorType errorHandling) throws EncodingException
decode
in interface EncodingCore
EncodingException
public boolean isEncodingSupported()
isEncodingSupported
in interface ComplexEncoding
public CodePointBuffer decodeString(String text, CodePointBuffer buffer)
public CodePointBuffer decode(char[] chars, int offset, int length, CodePointBuffer buffer)
public String encodeString(CodePointBuffer buffer)