| java.lang.Object sun.io.ByteToCharConverter sun.io.ByteToCharUnicode
All known Subclasses: sun.io.ByteToCharUnicodeLittleUnmarked, sun.io.ByteToCharUnicodeBigUnmarked, sun.io.ByteToCharUnicodeLittle, sun.io.ByteToCharUTF16, sun.io.ByteToCharUnicodeBig,
ByteToCharUnicode | public class ByteToCharUnicode extends ByteToCharConverter (Code) | | Convert byte arrays containing Unicode characters into arrays of actual
Unicode characters. This class may be used directly, in which case it
expects the input byte array to begin with a byte-order mark, or it may be
subclassed in order to preset the byte order and mark behavior.
Whether or not a mark is expected, if a mark that does not match the
established byte order is later discovered then a
MalformedInputException will be thrown by the convert
method. If a correct mark is seen later in the input stream, it is passed
through as a character.
See Also: ByteToCharUnicodeLittle See Also: ByteToCharUnicodeLittleUnmarked See Also: ByteToCharUnicodeBig See Also: ByteToCharUnicodeBigUnmarked version: 1.10, 00/02/02 author: Mark Reinhold |
Constructor Summary | |
public | ByteToCharUnicode() Creates a Unicode byte-to-char converter that expects the first pair of
input bytes to be a byte-order mark, which will be interpreted and
discarded. | protected | ByteToCharUnicode(int bo, boolean m) Creates a Unicode byte-to-char converter that uses the given byte order
and may or may not insist upon an initial byte-order mark. |
AUTO | final static int AUTO(Code) | | |
BYTE_ORDER_MARK | final static char BYTE_ORDER_MARK(Code) | | |
LITTLE | final static int LITTLE(Code) | | |
REVERSED_MARK | final static char REVERSED_MARK(Code) | | |
leftOver | boolean leftOver(Code) | | |
leftOverByte | int leftOverByte(Code) | | |
originalByteOrder | int originalByteOrder(Code) | | |
usesMark | boolean usesMark(Code) | | |
ByteToCharUnicode | public ByteToCharUnicode()(Code) | | Creates a Unicode byte-to-char converter that expects the first pair of
input bytes to be a byte-order mark, which will be interpreted and
discarded. If the first pair of bytes is not such a mark then a
MalformedInputException will be thrown by the convert method.
|
ByteToCharUnicode | protected ByteToCharUnicode(int bo, boolean m)(Code) | | Creates a Unicode byte-to-char converter that uses the given byte order
and may or may not insist upon an initial byte-order mark.
|
getCharacterEncoding | public String getCharacterEncoding()(Code) | | |
reset | public void reset()(Code) | | |
Methods inherited from sun.io.ByteToCharConverter | abstract public int convert(byte[] input, int inStart, int inEnd, char[] output, int outStart, int outEnd) throws MalformedInputException, UnknownCharacterException, ConversionBufferFullException(Code)(Java Doc) public char[] convertAll(byte input) throws MalformedInputException(Code)(Java Doc) abstract public int flush(char[] output, int outStart, int outEnd) throws MalformedInputException, ConversionBufferFullException(Code)(Java Doc) public int getBadInputLength()(Code)(Java Doc) abstract public String getCharacterEncoding()(Code)(Java Doc) public static ByteToCharConverter getConverter(String encoding) throws UnsupportedEncodingException(Code)(Java Doc) public static ByteToCharConverter getDefault()(Code)(Java Doc) public int getMaxCharsPerByte()(Code)(Java Doc) public int nextByteIndex()(Code)(Java Doc) public int nextCharIndex()(Code)(Java Doc) abstract public void reset()(Code)(Java Doc) public void setSubstitutionChars(char[] c) throws IllegalArgumentException(Code)(Java Doc) public void setSubstitutionMode(boolean doSub)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|