All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sun.io.ByteToCharSingleByte

java.lang.Object
   |
   +----sun.io.ByteToCharConverter
           |
           +----sun.io.ByteToCharSingleByte

public abstract class ByteToCharSingleByte
extends ByteToCharConverter
A table driven conversion from byte to char for single byte character sets. The needed data tables will reside in a character set specific subclass.


Variable Index

 o byteToCharTable
Mapping table.

Constructor Index

 o ByteToCharSingleByte()

Method Index

 o convert(byte[], int, int, char[], int, int)
Converts bytes to characters according to the selected character encoding.
 o flush(char[], int, int)
Writes any remaining output to the output buffer and resets the converter to its initial state.
 o reset()
Resets the converter.

Variables

 o byteToCharTable
 protected char byteToCharTable[]
Mapping table. Values supplied by subclass

Constructors

 o ByteToCharSingleByte
 public ByteToCharSingleByte()

Methods

 o flush
 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.

Overrides:
flush in class ByteToCharConverter
 o convert
 public int convert(byte input[],
                    int inOff,
                    int inEnd,
                    char output[],
                    int outOff,
                    int outEnd) throws UnknownCharacterException, MalformedInputException, ConversionBufferFullException
Converts bytes to characters according to the selected character encoding. Maintains internal state, so that conversions that result in exceptions can be restarted by calling convert again, with appropriately modified parameters. Call reset before converting input that is not a continuation of the previous call.

Parameters:
input - byte array containing text in character set
inStart - offset in input array
inEnd - offset of last byte to be converted
output - character array to receive conversion result
outStart - starting offset
outEnd - offset of last character to be written to
Returns:
the number of characters written to output.
Overrides:
convert in class ByteToCharConverter
See Also:
reset
 o reset
 public void reset()
Resets the converter. Call this method to reset the converter to its initial state

Overrides:
reset in class ByteToCharConverter

All Packages  Class Hierarchy  This Package  Previous  Next  Index