sun.io
Class ByteToCharISO2022JP

java.lang.Object
  extended by sun.io.ByteToCharConverter
      extended by sun.io.ByteToCharDoubleByte
          extended by sun.io.ByteToCharISO2022JP

public class ByteToCharISO2022JP
extends ByteToCharDoubleByte


Field Summary
protected static short[] index1
           
 
Fields inherited from class sun.io.ByteToCharDoubleByte
badInputLength, end, REPLACE_CHAR, savedByte, start
 
Fields inherited from class sun.io.ByteToCharConverter
byteOff, charOff, subChars, subMode
 
Constructor Summary
ByteToCharISO2022JP()
           
 
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.
 
Methods inherited from class sun.io.ByteToCharDoubleByte
convSingleByte, getUnicode
 
Methods inherited from class sun.io.ByteToCharConverter
convertAll, getBadInputLength, getConverter, getDefault, getMaxCharsPerByte, nextByteIndex, nextCharIndex, setSubstitutionChars, setSubstitutionMode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

index1

protected static final short[] index1
Constructor Detail

ByteToCharISO2022JP

public ByteToCharISO2022JP()
Method Detail

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 Byte
inOff - begin conversion at this offset in input array.
inEnd - offset of last byte to be converted
output - character array to receive conversion result
outOff - 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