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

pack-priv Class UTF_32Coder

extends Object
Class Inheritance
Imports
java.nio.ByteBuffer, .CharBuffer, java.nio.charset.Charset, .CoderResult, .CharsetDecoder, .CharsetEncoder

Nested and Inner Type Summary

Modifier and TypeClass and Description
protected static class
protected static class

Field Summary

Modifier and TypeField and Description
protected static final int
protected static final int
protected static final int
protected static final int
protected static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BIGback to summary
protected static final int BIG
BOM_BIGback to summary
protected static final int BOM_BIG
BOM_LITTLEback to summary
protected static final int BOM_LITTLE
LITTLEback to summary
protected static final int LITTLE
NONEback to summary
protected static final int NONE

Constructor Detail

UTF_32Coderback to summary
pack-priv UTF_32Coder()
sun.nio.cs back to summary

protected Class UTF_32Coder.Decoder

extends CharsetDecoder
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private int

Constructor Summary

AccessConstructor and Description
protected
Decoder(Charset cs, int bo)

Method Summary

Modifier and TypeMethod and Description
protected CoderResult
decodeLoop(ByteBuffer src, CharBuffer dst)

Implements abstract java.nio.charset.CharsetDecoder.decodeLoop.

Decodes one or more bytes into one or more characters.

private int
protected void
implReset()

Overrides java.nio.charset.CharsetDecoder.implReset.

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

Inherited from java.nio.charset.CharsetDecoder:
averageCharsPerBytecharsetdecodedecodedetectedCharsetflushimplFlushimplOnMalformedInputimplOnUnmappableCharacterimplReplaceWithisAutoDetectingisCharsetDetectedmalformedInputActionmaxCharsPerByteonMalformedInputonUnmappableCharacterreplacementreplaceWithresetunmappableCharacterAction

Field Detail

currentBOback to summary
private int currentBO
expectedBOback to summary
private int expectedBO

Constructor Detail

Decoderback to summary
protected Decoder(Charset cs, int bo)

Method Detail

decodeLoopback to summary
protected CoderResult decodeLoop(ByteBuffer src, CharBuffer dst)

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

getCPback to summary
private int getCP(ByteBuffer src)
implResetback to summary
protected void implReset()

Overrides java.nio.charset.CharsetDecoder.implReset.

Doc from java.nio.charset.CharsetDecoder.implReset.

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

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

sun.nio.cs back to summary

protected Class UTF_32Coder.Encoder

extends CharsetEncoder
Class Inheritance

Field Summary

Modifier and TypeField and Description
private int
private boolean
private boolean

Constructor Summary

AccessConstructor and Description
protected
Encoder(Charset cs, int byteOrder, boolean doBOM)

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.

public boolean
canEncode(CharSequence cs)

Overrides java.nio.charset.CharsetEncoder.canEncode.

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

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.

protected void
put(int cp, ByteBuffer dst)

Inherited from java.nio.charset.CharsetEncoder:
averageBytesPerCharcharsetencodeencodeflushimplFlushimplOnMalformedInputimplOnUnmappableCharacterimplReplaceWithisLegalReplacementmalformedInputActionmaxBytesPerCharonMalformedInputonUnmappableCharacterreplacementreplaceWithresetunmappableCharacterAction

Field Detail

byteOrderback to summary
private int byteOrder
doBOMback to summary
private boolean doBOM
doneBOMback to summary
private boolean doneBOM

Constructor Detail

Encoderback to summary
protected Encoder(Charset cs, int byteOrder, boolean doBOM)

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.

canEncodeback to summary
public boolean canEncode(CharSequence cs)

Overrides java.nio.charset.CharsetEncoder.canEncode.

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

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

If this method returns false for a particular character sequence then more information about why the sequence cannot be encoded may be obtained by performing a full encoding operation.

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.

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.

putback to summary
protected void put(int cp, ByteBuffer dst)