public class

CharToByteISO8859_1

extends CharToByteConverter
java.lang.Object
   ↳ sun.io.CharToByteConverter
     ↳ sun.io.CharToByteISO8859_1

Summary

[Expand]
Inherited Fields
From class sun.io.CharToByteConverter
Public Constructors
CharToByteISO8859_1()
Public Methods
boolean canConvert(char ch)
Returns true if the given character can be converted to the target character encoding.
int convert(char[] input, int inOff, int inEnd, byte[] output, int outOff, int outEnd)
Converts an array of Unicode characters into an array of bytes in the target character encoding.
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 converter to its initial state.
[Expand]
Inherited Methods
From class sun.io.CharToByteConverter
From class java.lang.Object

Public Constructors

public CharToByteISO8859_1 ()

Public Methods

public boolean canConvert (char ch)

Returns true if the given character can be converted to the target character encoding.

Parameters
ch character to test
Returns
  • true if given character is translatable, false otherwise.

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

Converts an array of Unicode characters into an array of bytes in the target character encoding. This method allows a buffer by buffer conversion of a data stream. The state of the conversion is saved between calls to convert. 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 array containing Unicode characters to be converted.
inOff begin conversion at this offset in input array.
inEnd stop conversion at this offset in input array (exclusive).
output byte 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 (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 converter to its initial state.