sun.io
Class ByteToCharISO2022JP
java.lang.Object
sun.io.ByteToCharConverter
sun.io.ByteToCharDoubleByte
sun.io.ByteToCharISO2022JP
public class ByteToCharISO2022JP
- extends ByteToCharDoubleByte
|
Field Summary |
protected static short[] |
index1
|
|
Method Summary |
int |
convert(byte[] input,
int inOff,
int inEnd,
char[] output,
int outOff,
int outEnd)
Character conversion |
int |
flush(char[] output,
int outStart,
int outEnd)
Writes any remaining output to the output buffer and resets the
converter to its initial state. |
String |
getCharacterEncoding()
Returns the character set id for the conversion |
void |
reset()
Resets the converter. |
index1
protected static final short[] index1
ByteToCharISO2022JP
public ByteToCharISO2022JP()
flush
public int flush(char[] output,
int outStart,
int outEnd)
throws MalformedInputException
- Description copied from class:
ByteToCharConverter
- Writes any remaining output to the output buffer and resets the
converter to its initial state.
- Overrides:
flush in class ByteToCharDoubleByte
- Parameters:
output - char array to receive flushed output.outStart - start writing to output array at this offset.outEnd - stop writing to output array at this offset (exclusive).
- Throws:
MalformedInputException - if the output to be flushed contained
a partial or invalid multibyte character sequence. flush will
write what it can to the output buffer and reset the converter before
throwing this exception. An additional call to flush is not required.
convert
public int convert(byte[] input,
int inOff,
int inEnd,
char[] output,
int outOff,
int outEnd)
throws UnknownCharacterException,
MalformedInputException,
ConversionBufferFullException
- Character conversion
- Overrides:
convert in class ByteToCharDoubleByte
- Parameters:
input - byte array containing text in Double/single ByteinOff - begin conversion at this offset in input array.inEnd - offset of last byte to be convertedoutput - character array to receive conversion resultoutOff - start writing to output array at this offset.outEnd - offset of last byte to be written to
- Returns:
- the characters written to output.
- Throws:
UnknownCharacterException - for any character that
that cannot be converted to Unicode. Thrown only when converter
is not in substitution mode.
MalformedInputException - if the input buffer contains any
sequence of bytes that is illegal for the input character set.
ConversionBufferFullException - if output array is filled prior
to converting all the input.
reset
public void reset()
- Description copied from class:
ByteToCharDoubleByte
- Resets the converter.
Call this method to reset the converter to its initial state
- Overrides:
reset in class ByteToCharDoubleByte
getCharacterEncoding
public String getCharacterEncoding()
- Description copied from class:
ByteToCharConverter
- Returns the character set id for the conversion