Package net.freeutils.charset
Class PackedGSMCharset.Decoder
java.lang.Object
java.nio.charset.CharsetDecoder
net.freeutils.charset.EscapedByteLookupCharset.Decoder
net.freeutils.charset.PackedGSMCharset.Decoder
- Enclosing class:
- PackedGSMCharset
The Decoder inner class handles the decoding of the
Packed GSM default encoding charset.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CoderResult
decodeLoop
(ByteBuffer in, CharBuffer out) Decodes one or more bytes into one or more characters.protected CoderResult
implFlush
(CharBuffer out) Flushes this decoder.protected void
Resets this decoder, clearing any charset-specific internal state.protected CoderResult
unpack
(ByteBuffer in, ByteBuffer out) Unpacks the given data into original bytes.Methods inherited from class java.nio.charset.CharsetDecoder
averageCharsPerByte, charset, decode, decode, detectedCharset, flush, implOnMalformedInput, implOnUnmappableCharacter, implReplaceWith, isAutoDetecting, isCharsetDetected, malformedInputAction, maxCharsPerByte, onMalformedInput, onUnmappableCharacter, replacement, replaceWith, reset, unmappableCharacterAction
-
Constructor Details
-
Decoder
Constructs a Decoder.- Parameters:
cs
- the charset to which this decoder belongs
-
-
Method Details
-
implReset
protected void implReset()Resets this decoder, clearing any charset-specific internal state.- Overrides:
implReset
in classCharsetDecoder
-
implFlush
Flushes this decoder.- Overrides:
implFlush
in classCharsetDecoder
- Parameters:
out
- The output character buffer- Returns:
- A coder-result object, either
CoderResult.UNDERFLOW
orCoderResult.OVERFLOW
-
decodeLoop
Decodes one or more bytes into one or more characters.- Overrides:
decodeLoop
in classEscapedByteLookupCharset.Decoder
- Parameters:
in
- the input byte bufferout
- the output character buffer- Returns:
- a coder-result object describing the reason for termination
-
unpack
Unpacks the given data into original bytes.- Parameters:
in
- the input byte bufferout
- the output byte buffer- Returns:
- A coder-result object, either
CoderResult.UNDERFLOW
orCoderResult.OVERFLOW
-