java.nio.charset
Class CharsetDecoder
java.lang.Object
java.nio.charset.CharsetDecoder
public abstract class CharsetDecoder
- extends Object
- Since:
- 1.4
Constructor Summary |
protected |
CharsetDecoder(Charset cs,
float averageCharsPerByte,
float maxCharsPerByte)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CharsetDecoder
protected CharsetDecoder(Charset cs,
float averageCharsPerByte,
float maxCharsPerByte)
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()