public class

CharToByteCp933

extends CharToByteConverter
java.lang.Object
   ↳ sun.io.CharToByteConverter
     ↳ sun.io.CharToByteCp933
Known Direct Subclasses

Summary

[Expand]
Inherited Fields
From class sun.io.CharToByteConverter
Public Constructors
CharToByteCp933()
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)
Character conversion
int flush(byte[] output, int outStart, int outEnd)
flush out any residual data and reset the buffer state
String getCharacterEncoding()
Return the character set ID
int getMaxBytesPerChar()
returns the maximum number of bytes needed to convert a char
void reset()
Resets converter to its initial state.
void setSubstitutionBytes(byte[] newSubBytes)
Sets the substitution bytes to use when the converter is in substitution mode.
Protected Methods
boolean doSBCS()
int encodeHangul(char unicode)
[Expand]
Inherited Methods
From class sun.io.CharToByteConverter
From class java.lang.Object

Public Constructors

public CharToByteCp933 ()

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)

Character conversion

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)

flush out any residual data and reset the buffer 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 ()

Return the character set ID

public int getMaxBytesPerChar ()

returns the maximum number of bytes needed to convert a char

public void reset ()

Resets converter to its initial state.

public void setSubstitutionBytes (byte[] newSubBytes)

Sets the substitution bytes to use when the converter is in substitution mode. The given bytes should represent a valid character in the target character encoding.

Parameters
newSubBytes the substitution bytes

Protected Methods

protected boolean doSBCS ()

protected int encodeHangul (char unicode)