java.nio.charset
Class CharsetDecoder

java.lang.Object
  extended by java.nio.charset.CharsetDecoder

public abstract class CharsetDecoder
extends Object

Since:
1.4

Constructor Summary
protected CharsetDecoder(Charset cs, float averageCharsPerByte, float maxCharsPerByte)
           
 
Method Summary
 float averageCharsPerByte()
           
 Charset charset()
           
 CharBuffer decode(ByteBuffer in)
           
 CoderResult decode(ByteBuffer in, CharBuffer out, boolean endOfInput)
           
protected abstract  CoderResult decodeLoop(ByteBuffer in, CharBuffer out)
           
 Charset detectedCharset()
           
 CoderResult flush(CharBuffer out)
           
protected  CoderResult implFlush(CharBuffer out)
           
protected  void implOnMalformedInput(CodingErrorAction newAction)
           
protected  void implOnUnmappableCharacter(CodingErrorAction newAction)
           
protected  void implReplaceWith(String newReplacement)
           
protected  void implReset()
           
 boolean isAutoDetecting()
           
 boolean isCharsetDetected()
           
 CodingErrorAction malformedInputAction()
           
 float maxCharsPerByte()
           
 CharsetDecoder onMalformedInput(CodingErrorAction newAction)
           
 CharsetDecoder onUnmappableCharacter(CodingErrorAction newAction)
           
 String replacement()
           
 CharsetDecoder replaceWith(String newReplacement)
           
 CharsetDecoder reset()
           
 CodingErrorAction unmappableCharacterAction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CharsetDecoder

protected CharsetDecoder(Charset cs,
                         float averageCharsPerByte,
                         float maxCharsPerByte)
Method Detail

averageCharsPerByte

public final float averageCharsPerByte()

charset

public final Charset charset()

decode

public final CharBuffer decode(ByteBuffer in)
                        throws CharacterCodingException
Throws:
CharacterCodingException

decode

public final CoderResult decode(ByteBuffer in,
                                CharBuffer out,
                                boolean endOfInput)

decodeLoop

protected abstract CoderResult decodeLoop(ByteBuffer in,
                                          CharBuffer out)

detectedCharset

public Charset detectedCharset()

flush

public final CoderResult flush(CharBuffer out)

implFlush

protected CoderResult implFlush(CharBuffer out)

onMalformedInput

public final CharsetDecoder onMalformedInput(CodingErrorAction newAction)

implOnMalformedInput

protected void implOnMalformedInput(CodingErrorAction newAction)

implOnUnmappableCharacter

protected void implOnUnmappableCharacter(CodingErrorAction newAction)

implReplaceWith

protected void implReplaceWith(String newReplacement)

implReset

protected void implReset()

isAutoDetecting

public boolean isAutoDetecting()

isCharsetDetected

public boolean isCharsetDetected()

malformedInputAction

public CodingErrorAction malformedInputAction()

maxCharsPerByte

public final float maxCharsPerByte()

onUnmappableCharacter

public final CharsetDecoder onUnmappableCharacter(CodingErrorAction newAction)

replacement

public final String replacement()

replaceWith

public final CharsetDecoder replaceWith(String newReplacement)

reset

public final CharsetDecoder reset()

unmappableCharacterAction

public CodingErrorAction unmappableCharacterAction()