Packages

final class CharsetEncoder extends AnyVal

An engine that can transform a sequence of sixteen-bit Unicode characters into a sequence of bytes in a specific charset.

Important: an encoder instance is stateful, as it internally tracks the state of the current encoding operation.

  • an encoder instance cannot be used concurrently, it can only encode a single sequence of characters at a time
  • after an encode operation is completed, the reset method must be used to reset the decoder before using it again on a new sequence of characters
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CharsetEncoder
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##: Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def averageBytesPerChar: Float
  6. def charset: Charset
  7. def encode(in: CharBuffer, out: ByteBuffer, endOfInput: Boolean)(implicit trace: Trace): UIO[CoderResult]
  8. def encode(in: CharBuffer)(implicit trace: Trace): IO[CharacterCodingException, ByteBuffer]
  9. def flush(out: ByteBuffer)(implicit trace: Trace): UIO[CoderResult]
  10. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. val javaEncoder: java.nio.charset.CharsetEncoder
  13. def malformedInputAction(implicit trace: Trace): UIO[CodingErrorAction]
  14. def maxCharsPerByte: Float
  15. def onMalformedInput(errorAction: CodingErrorAction)(implicit trace: Trace): UIO[Unit]
  16. def onUnmappableCharacter(errorAction: CodingErrorAction)(implicit trace: Trace): UIO[Unit]
  17. def replaceWith(replacement: Chunk[Byte])(implicit trace: Trace): UIO[Unit]
  18. def replacement(implicit trace: Trace): UIO[Chunk[Byte]]
  19. def reset(implicit trace: Trace): UIO[Unit]

    Resets this decoder, clearing any internal state.

  20. def toString(): String
    Definition Classes
    Any
  21. def transducer(bufSize: Int = 5000)(implicit trace: Trace): ZPipeline[Any, CharacterCodingException, Char, Byte]

    Encodes a stream of characters into bytes according to this character set's encoding.

    Encodes a stream of characters into bytes according to this character set's encoding.

    Note the returned transducer is tied to this encoder and cannot be used concurrently.

    bufSize

    The size of the internal buffer used for encoding. Must be at least 50.

  22. def unmappableCharacterAction(implicit trace: Trace): UIO[CodingErrorAction]

Inherited from AnyVal

Inherited from Any

Ungrouped