public class

CharToByteISCII91

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

Class Overview

Converter class. Converts between ISCII91 encoding and Unicode encoding. ISCII91 is the character encoding as defined in Indian Standard document IS 13194:1991 ( Indian Script Code for Information Interchange ).

Summary

[Expand]
Inherited Fields
From class sun.io.CharToByteConverter
Public Constructors
CharToByteISCII91()
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 inStart, int inEnd, byte[] output, int outStart, int outEnd)
Converts both Devanagari and ASCII range of characters.
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 CharToByteISCII91 ()

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 for Devanagari and ASCII range and for the special characters Zero Width Joiner and Zero Width Non-Joiner
See Also

public int convert (char[] input, int inStart, int inEnd, byte[] output, int outStart, int outEnd)

Converts both Devanagari and ASCII range of characters.

Parameters
input array containing Unicode characters to be converted.
inStart 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.
outStart 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.

Returns
  • The character encoding as a String.

public int getMaxBytesPerChar ()

Returns the maximum number of bytes needed to convert a char. Useful for calculating the maximum output buffer size needed for a particular input buffer.

public void reset ()

Resets converter to its initial state.

See Also