Class EscapedByteLookupCharset.Encoder

java.lang.Object
java.nio.charset.CharsetEncoder
net.freeutils.charset.EscapedByteLookupCharset.Encoder
Direct Known Subclasses:
PackedGSMCharset.Encoder
Enclosing class:
EscapedByteLookupCharset

protected class EscapedByteLookupCharset.Encoder extends CharsetEncoder
The Encoder inner class handles the encoding of the charset using the lookup tables.
  • Constructor Details

    • Encoder

      protected Encoder(Charset cs)
      Constructs an Encoder.
      Parameters:
      cs - the charset to which this encoder belongs
    • Encoder

      protected Encoder(Charset cs, float averageBytesPerChar, float maxBytesPerChar)
      Constructs an Encoder.
      Parameters:
      cs - the charset to which this encoder belongs
  • Method Details

    • encodeLoop

      protected CoderResult encodeLoop(CharBuffer in, ByteBuffer out)
      Encodes one or more characters into one or more bytes.
      Specified by:
      encodeLoop in class CharsetEncoder
      Parameters:
      in - the input character buffer
      out - the output byte buffer
      Returns:
      a coder-result object describing the reason for termination