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

pack-priv abstract Class ISO2022

extends Charset
Class Inheritance
Known Direct Subclasses
sun.nio.cs.ext.ISO2022_CN_CNS, sun.nio.cs.ext.ISO2022_CN_GB, sun.nio.cs.ext.ISO2022_KR
Imports
java.nio.ByteBuffer, .CharBuffer, java.nio.charset.Charset, .CharsetDecoder, .CharsetEncoder, .CoderResult, sun.nio.cs.Surrogate

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class

Constructor Summary

AccessConstructor and Description
public
ISO2022(String csname, String[] aliases)

Method Summary

Modifier and TypeMethod and Description
public abstract CharsetDecoder
newDecoder()

Implements abstract java.nio.charset.Charset.newDecoder.

Constructs a new decoder for this charset.

public abstract CharsetEncoder
newEncoder()

Implements abstract java.nio.charset.Charset.newEncoder.

Constructs a new encoder for this charset.

Inherited from java.nio.charset.Charset:
aliasesavailableCharsetscanEncodecompareTocontainsdecodedefaultCharsetdisplayNamedisplayNameencodeencodeequalsforNameforNamehashCodeisRegisteredisSupportednametoString

Constructor Detail

ISO2022back to summary
public ISO2022(String csname, String[] aliases)

Method Detail

newDecoderback to summary
public abstract CharsetDecoder newDecoder()

Implements abstract java.nio.charset.Charset.newDecoder.

Doc from java.nio.charset.Charset.newDecoder.

Constructs a new decoder for this charset.

newEncoderback to summary
public abstract CharsetEncoder newEncoder()

Implements abstract java.nio.charset.Charset.newEncoder.

Doc from java.nio.charset.Charset.newEncoder.

Constructs a new encoder for this charset.

sun.nio.cs.ext back to summary

protected Class ISO2022.Encoder

extends CharsetEncoder
Class Inheritance
Known Direct Subclasses
sun.nio.cs.ext.ISO2022_CN_CNS.Encoder, sun.nio.cs.ext.ISO2022_CN_GB.Encoder, sun.nio.cs.ext.ISO2022_KR.Encoder

Field Summary

Modifier and TypeField and Description
private static final byte
private static final byte
private static final byte
private static final byte
private static final byte
protected CharsetEncoder
private boolean
private boolean
private boolean
private boolean
public static final byte
public static final byte
private final Surrogate.Parser
private boolean
private boolean
protected byte[]
public static final byte
private boolean
protected byte[]
private boolean
protected byte[]

Constructor Summary

AccessConstructor and Description
protected

Method Summary

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

Overrides java.nio.charset.CharsetEncoder.canEncode.

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

private CoderResult
private CoderResult
protected CoderResult
encodeLoop(CharBuffer src, ByteBuffer dst)

Implements abstract java.nio.charset.CharsetEncoder.encodeLoop.

Encodes one or more characters into one or more bytes.

protected void
implReset()

Overrides java.nio.charset.CharsetEncoder.implReset.

Resets this encoder, clearing any charset-specific internal state.

private int
unicodeToNative(char unicode, byte[] ebyte)

Inherited from java.nio.charset.CharsetEncoder:
averageBytesPerCharcanEncodecharsetencodeencodeflushimplFlushimplOnMalformedInputimplOnUnmappableCharacterimplReplaceWithisLegalReplacementmalformedInputActionmaxBytesPerCharonMalformedInputonUnmappableCharacterreplacementreplaceWithresetunmappableCharacterAction

Field Detail

ISO_ESCback to summary
private static final byte ISO_ESC
ISO_SIback to summary
private static final byte ISO_SI
ISO_SOback to summary
private static final byte ISO_SO
ISO_SS2_7back to summary
private static final byte ISO_SS2_7
ISO_SS3_7back to summary
private static final byte ISO_SS3_7
ISOEncoderback to summary
protected CharsetEncoder ISOEncoder
newshiftoutback to summary
private boolean newshiftout
newSODesDefinedback to summary
private boolean newSODesDefined
newSS2DesDefinedback to summary
private boolean newSS2DesDefined
newSS3DesDefinedback to summary
private boolean newSS3DesDefined
PLANE2back to summary
public static final byte PLANE2
PLANE3back to summary
public static final byte PLANE3
sgpback to summary
private final Surrogate.Parser sgp
shiftoutback to summary
private boolean shiftout
SODesDefinedback to summary
private boolean SODesDefined
SODesigback to summary
protected byte[] SODesig
SS2back to summary
public static final byte SS2
SS2DesDefinedback to summary
private boolean SS2DesDefined
SS2Desigback to summary
protected byte[] SS2Desig
SS3DesDefinedback to summary
private boolean SS3DesDefined
SS3Desigback to summary
protected byte[] SS3Desig

Constructor Detail

Encoderback to summary
protected Encoder(Charset cs)

Method Detail

canEncodeback to summary
public boolean canEncode(char c)

Overrides java.nio.charset.CharsetEncoder.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
private CoderResult encodeArrayLoop(CharBuffer src, ByteBuffer dst)
encodeBufferLoopback to summary
private CoderResult encodeBufferLoop(CharBuffer src, ByteBuffer dst)
encodeLoopback to summary
protected CoderResult encodeLoop(CharBuffer src, ByteBuffer dst)

Implements abstract java.nio.charset.CharsetEncoder.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.

implResetback to summary
protected void implReset()

Overrides java.nio.charset.CharsetEncoder.implReset.

Doc from java.nio.charset.CharsetEncoder.implReset.

Resets this encoder, clearing any charset-specific internal state.

The default implementation of this method does nothing. This method should be overridden by encoders that maintain internal state.

unicodeToNativeback to summary
private int unicodeToNative(char unicode, byte[] ebyte)