Package net.freeutils.charset
Class UTF7Charset.Encoder
java.lang.Object
java.nio.charset.CharsetEncoder
net.freeutils.charset.UTF7Charset.Encoder
- Enclosing class:
- UTF7Charset
The Encoder inner class handles the encoding of the UTF7 charset.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected CoderResult
encodeLoop
(CharBuffer in, ByteBuffer out) Encodes one or more characters into one or more bytes.protected CoderResult
implFlush
(ByteBuffer out) Flushes this encoder.protected void
Resets this decoder, clearing any charset-specific internal state.Methods inherited from class java.nio.charset.CharsetEncoder
averageBytesPerChar, canEncode, canEncode, charset, encode, encode, flush, implOnMalformedInput, implOnUnmappableCharacter, implReplaceWith, isLegalReplacement, malformedInputAction, maxBytesPerChar, onMalformedInput, onUnmappableCharacter, replacement, replaceWith, reset, unmappableCharacterAction
-
Constructor Details
-
Encoder
Constructs an Encoder.- Parameters:
cs
- the charset to which this encoder belongs
-
-
Method Details
-
implReset
protected void implReset()Resets this decoder, clearing any charset-specific internal state.- Overrides:
implReset
in classCharsetEncoder
-
implFlush
Flushes this encoder.- Overrides:
implFlush
in classCharsetEncoder
- Parameters:
out
- The output byte buffer- Returns:
- A coder-result object, either
CoderResult.UNDERFLOW
orCoderResult.OVERFLOW
-
encodeLoop
Encodes one or more characters into one or more bytes.- Specified by:
encodeLoop
in classCharsetEncoder
- Parameters:
in
- the input character bufferout
- the output byte buffer- Returns:
- a coder-result object describing the reason for termination
-