public abstract class

ByteToCharISO2022

extends ByteToCharConverter
java.lang.Object
   ↳ sun.io.ByteToCharConverter
     ↳ sun.io.ByteToCharISO2022
Known Direct Subclasses

Class Overview

An algorithmic conversion from ISO 2022 to Unicode

Summary

Fields
protected ByteToCharConverter[] SOConverter
protected String[] SODesignator
protected ByteToCharConverter[] SS2Converter
protected String[] SS2Designator
protected ByteToCharConverter[] SS3Converter
protected String[] SS3Designator
[Expand]
Inherited Fields
From class sun.io.ByteToCharConverter
Public Constructors
ByteToCharISO2022()
Public Methods
final int convert(byte[] input, int inOff, int inEnd, char[] output, int outOff, int outEnd)
Converts an array of bytes containing characters in an external encoding into an array of Unicode characters.
int flush(char[] output, int outStart, int outEnd)
Writes any remaining output to the output buffer and resets the converter to its initial state.
void reset()
Resets converter to its initial state.
[Expand]
Inherited Methods
From class sun.io.ByteToCharConverter
From class java.lang.Object

Fields

protected ByteToCharConverter[] SOConverter

protected String[] SODesignator

protected ByteToCharConverter[] SS2Converter

protected String[] SS2Designator

protected ByteToCharConverter[] SS3Converter

protected String[] SS3Designator

Public Constructors

public ByteToCharISO2022 ()

Public Methods

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

Converts an array of bytes containing characters in an external encoding into an array of Unicode characters. This method allows a buffer by buffer conversion of a data stream. The state of the conversion is saved between calls to convert. Among other things, this means multibyte input sequences can be split between calls. If a call to convert results in an exception, the conversion may be continued by calling convert again with suitably modified parameters. All conversions should be finished with a call to the flush method.

Parameters
input byte array containing text to be converted.
inOff begin conversion at this offset in input array.
inEnd stop conversion at this offset in input array (exclusive).
output character array to receive conversion result.
outOff start writing to output array at this offset.
outEnd stop writing to output array at this offset (exclusive).
Returns
  • the number of bytes written to output.

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

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

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).

public void reset ()

Resets converter to its initial state.