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 CoderResultencodeLoop(CharBuffer in, ByteBuffer out) Encodes one or more characters into one or more bytes.protected CoderResultimplFlush(ByteBuffer out) Flushes this encoder.protected voidResets 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:
implResetin classCharsetEncoder
-
implFlush
Flushes this encoder.- Overrides:
implFlushin classCharsetEncoder- Parameters:
out- The output byte buffer- Returns:
- A coder-result object, either
CoderResult.UNDERFLOWorCoderResult.OVERFLOW
-
encodeLoop
Encodes one or more characters into one or more bytes.- Specified by:
encodeLoopin classCharsetEncoder- Parameters:
in- the input character bufferout- the output byte buffer- Returns:
- a coder-result object describing the reason for termination
-