public class

CharToByteISO2022JP

extends CharToByteJIS0208
java.lang.Object
   ↳ sun.io.CharToByteConverter
     ↳ sun.io.CharToByteDoubleByte
       ↳ sun.io.CharToByteJIS0208
         ↳ sun.io.CharToByteISO2022JP

Summary

Fields
protected byte[] subBytesEscape Bytes for substitute for unmappable input.
protected int subBytesMode
[Expand]
Inherited Fields
From class sun.io.CharToByteDoubleByte
From class sun.io.CharToByteConverter
Public Constructors
CharToByteISO2022JP()
Public Methods
int convert(char[] input, int inOff, int inEnd, byte[] output, int outOff, int outEnd)
Converts characters to sequences of bytes.
int flush(byte[] 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.
int getMaxBytesPerChar()
returns the maximum number of bytes needed to convert a char
void reset()
Resets the converter.
[Expand]
Inherited Methods
From class sun.io.CharToByteJIS0208
From class sun.io.CharToByteDoubleByte
From class sun.io.CharToByteConverter
From class java.lang.Object

Fields

protected byte[] subBytesEscape

Bytes for substitute for unmappable input.

protected int subBytesMode

Public Constructors

public CharToByteISO2022JP ()

Public Methods

public int convert (char[] input, int inOff, int inEnd, byte[] output, int outOff, int outEnd)

Converts characters to sequences of bytes. Conversions that result in Exceptions can be restarted by calling convert again, with appropriately modified parameters.

Parameters
input char array containing text in Unicode
inOff begin conversion at this offset in input array.
inEnd offset of last byte to be converted
output byte 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.

public int flush (byte[] output, int outStart, int outEnd)

Writes any remaining output to the output buffer and resets the converter to its initial state.

Parameters
output byte array to receive flushed output.
outStart start writing to output array at this offset.
outEnd stop writing to output array at this offset (exclusive).

public String getCharacterEncoding ()

Returns the character set id for the conversion.

public int getMaxBytesPerChar ()

returns the maximum number of bytes needed to convert a char

public void reset ()

Resets the converter. Call this method to reset the converter to its initial state