APIdia Launch Partner
Top Inners Constructors Methods
sun.nio.cs

public Class HKSCS

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .CharBuffer, java.nio.charset.Charset, .CoderResult, java.util.Arrays

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
public static class

Constructor Summary

AccessConstructor and Description
public

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

HKSCSback to summary
public HKSCS()
sun.nio.cs back to summary

public Class HKSCS.Decoder

extends Decoder
Class Inheritance
Known Direct Subclasses
sun.nio.cs.Big5_HKSCS.Decoder

Field Summary

Modifier and TypeField and Description
private final char[][]
private final char[][]
pack-priv static int
pack-priv static int
private final DoubleByte.Decoder
Inherited from sun.nio.cs.DoubleByte.Decoder:
b2cb2cSBisASCIICompatible

Constructor Summary

AccessConstructor and Description
protected
Decoder(Charset cs, DoubleByte.Decoder big5Dec, char[][] b2cBmp, char[][] b2cSupp)

Method Summary

Modifier and TypeMethod and Description
public int
decode(byte[] src, int sp, int len, char[] dst)

Overrides sun.nio.cs.DoubleByte.Decoder.decode.

Implements sun.nio.cs.ArrayDecoder.decode.

protected CoderResult
public char
decodeBig5(int b1, int b2)

protected CoderResult
public char
public char
decodeDoubleEx(int b1, int b2)

public CoderResult
decodeLoop(ByteBuffer src, CharBuffer dst)

Overrides sun.nio.cs.DoubleByte.Decoder.decodeLoop.

Implements sun.nio.cs.DelegatableDecoder.decodeLoop.

Decodes one or more bytes into one or more characters.

public char
public static void
initb2c(char[][] b2c, String[] b2cStr)

Inherited from sun.nio.cs.DoubleByte.Decoder:
crMalformedOrUnderFlowcrMalformedOrUnmappableimplFlushimplResetisASCIICompatible

Field Detail

b2cBmpback to summary
private final char[][] b2cBmp
b2cSuppback to summary
private final char[][] b2cSupp
b2Maxback to summary
pack-priv static int b2Max

Hides sun.nio.cs.DoubleByte.Decoder.b2Max.

b2Minback to summary
pack-priv static int b2Min

Hides sun.nio.cs.DoubleByte.Decoder.b2Min.

big5Decback to summary
private final DoubleByte.Decoder big5Dec

Constructor Detail

Decoderback to summary
protected Decoder(Charset cs, DoubleByte.Decoder big5Dec, char[][] b2cBmp, char[][] b2cSupp)

Method Detail

decodeback to summary
public int decode(byte[] src, int sp, int len, char[] dst)

Overrides sun.nio.cs.DoubleByte.Decoder.decode.

Implements sun.nio.cs.ArrayDecoder.decode.

decodeArrayLoopback to summary
protected CoderResult decodeArrayLoop(ByteBuffer src, CharBuffer dst)

Overrides sun.nio.cs.DoubleByte.Decoder.decodeArrayLoop.

decodeBig5back to summary
public char decodeBig5(int b1, int b2)
decodeBufferLoopback to summary
protected CoderResult decodeBufferLoop(ByteBuffer src, CharBuffer dst)

Overrides sun.nio.cs.DoubleByte.Decoder.decodeBufferLoop.

decodeDoubleback to summary
public char decodeDouble(int b1, int b2)

Overrides sun.nio.cs.DoubleByte.Decoder.decodeDouble.

decodeDoubleExback to summary
public char decodeDoubleEx(int b1, int b2)
decodeLoopback to summary
public CoderResult decodeLoop(ByteBuffer src, CharBuffer dst)

Overrides sun.nio.cs.DoubleByte.Decoder.decodeLoop.

Implements sun.nio.cs.DelegatableDecoder.decodeLoop.

Doc from java.nio.charset.CharsetDecoder.decodeLoop.

Decodes one or more bytes into one or more characters.

This method encapsulates the basic decoding loop, decoding as many bytes as possible until it either runs out of input, runs out of room in the output buffer, or encounters a decoding error. This method is invoked by the decode method, which handles result interpretation and error recovery.

The buffers are read from, and written to, starting at their current positions. At most in.remaining() bytes will be read, and at most out.remaining() characters will be written. The buffers' positions will be advanced to reflect the bytes read and the characters written, but their marks and limits will not be modified.

This method returns a CoderResult object to describe its reason for termination, in the same manner as the decode method. Most implementations of this method will handle decoding errors by returning an appropriate result object for interpretation by the decode method. An optimized implementation may instead examine the relevant error action and implement that action itself.

An implementation of this method may perform arbitrary lookahead by returning CoderResult#UNDERFLOW until it receives sufficient input.

decodeSingleback to summary
public char decodeSingle(int b)

Overrides sun.nio.cs.DoubleByte.Decoder.decodeSingle.

initb2cback to summary
public static void initb2c(char[][] b2c, String[] b2cStr)
sun.nio.cs back to summary

public Class HKSCS.Encoder

extends Encoder
Class Inheritance
Known Direct Subclasses
sun.nio.cs.Big5_HKSCS.Encoder

Field Summary

Modifier and TypeField and Description
private final DoubleByte.Encoder
pack-priv static char[]
private final char[][]
private final char[][]
Inherited from sun.nio.cs.DoubleByte.Encoder:
isASCIICompatibleMAX_SINGLEBYTEreplsgp

Constructor Summary

AccessConstructor and Description
protected
Encoder(Charset cs, DoubleByte.Encoder big5Enc, char[][] c2bBmp, char[][] c2bSupp)

Method Summary

Modifier and TypeMethod and Description
public boolean
canEncode(char c)

Overrides sun.nio.cs.DoubleByte.Encoder.canEncode.

Tells whether or not this encoder can encode the given character.

protected CoderResult
public int
encodeBig5(char ch)

protected CoderResult
public int
public int
encodeFromUTF16(byte[] src, int sp, int len, byte[] dst, int dp)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeFromUTF16.

Implements sun.nio.cs.ArrayEncoder.encodeFromUTF16.

protected CoderResult
encodeLoop(CharBuffer src, ByteBuffer dst)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeLoop.

Encodes one or more characters into one or more bytes.

public int
encodeSupp(int cp)

public static void
initc2b(char[][] c2b, String[] b2cStr, String pua)

Inherited from sun.nio.cs.DoubleByte.Encoder:
canEncodeencodeFromLatin1implReplaceWithinitC2BisASCIICompatiblesgp

Field Detail

big5Encback to summary
private final DoubleByte.Encoder big5Enc
C2B_UNMAPPABLEback to summary
pack-priv static char[] C2B_UNMAPPABLE
c2bBmpback to summary
private final char[][] c2bBmp
c2bSuppback to summary
private final char[][] c2bSupp

Constructor Detail

Encoderback to summary
protected Encoder(Charset cs, DoubleByte.Encoder big5Enc, char[][] c2bBmp, char[][] c2bSupp)

Method Detail

canEncodeback to summary
public boolean canEncode(char c)

Overrides sun.nio.cs.DoubleByte.Encoder.canEncode.

Doc from java.nio.charset.CharsetEncoder.canEncode.

Tells whether or not this encoder can encode the given character.

This method returns false if the given character is a surrogate character; such characters can be interpreted only when they are members of a pair consisting of a high surrogate followed by a low surrogate. The canEncode(CharSequence) method may be used to test whether or not a character sequence can be encoded.

This method may modify this encoder's state; it should therefore not be invoked if an encoding operation is already in progress.

The default implementation of this method is not very efficient; it should generally be overridden to improve performance.

encodeArrayLoopback to summary
protected CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeArrayLoop.

encodeBig5back to summary
public int encodeBig5(char ch)
encodeBufferLoopback to summary
protected CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeBufferLoop.

encodeCharback to summary
public int encodeChar(char ch)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeChar.

encodeFromUTF16back to summary
public int encodeFromUTF16(byte[] src, int sp, int len, byte[] dst, int dp)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeFromUTF16.

Implements sun.nio.cs.ArrayEncoder.encodeFromUTF16.

Annotations
@Override
encodeLoopback to summary
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst)

Overrides sun.nio.cs.DoubleByte.Encoder.encodeLoop.

Doc from java.nio.charset.CharsetEncoder.encodeLoop.

Encodes one or more characters into one or more bytes.

This method encapsulates the basic encoding loop, encoding as many characters as possible until it either runs out of input, runs out of room in the output buffer, or encounters an encoding error. This method is invoked by the encode method, which handles result interpretation and error recovery.

The buffers are read from, and written to, starting at their current positions. At most in.remaining() characters will be read, and at most out.remaining() bytes will be written. The buffers' positions will be advanced to reflect the characters read and the bytes written, but their marks and limits will not be modified.

This method returns a CoderResult object to describe its reason for termination, in the same manner as the encode method. Most implementations of this method will handle encoding errors by returning an appropriate result object for interpretation by the encode method. An optimized implementation may instead examine the relevant error action and implement that action itself.

An implementation of this method may perform arbitrary lookahead by returning CoderResult#UNDERFLOW until it receives sufficient input.

encodeSuppback to summary
public int encodeSupp(int cp)
initc2bback to summary
public static void initc2b(char[][] c2b, String[] b2cStr, String pua)