final class CharsetDecoder extends AnyVal
An engine that can transform a sequence of bytes in a specific charset into a sequence of sixteen-bit Unicode characters.
Important: a decoder instance is stateful, as it internally tracks the state of the current decoding operation.
- a decoder instance cannot be used concurrently, it can only decode a single sequence of bytes at a time
- after a decode operation is completed, the
reset
method must be used to reset the decoder before using it again on a new sequence of bytes
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- CharsetDecoder
- AnyVal
- Any
- Hide All
- Show All
Visibility
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- Any
- final def ##: Int
- Definition Classes
- Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def autoDetect(implicit trace: Trace): UIO[AutoDetect]
- def averageCharsPerByte: Float
- def charset: Charset
- def decode(in: ByteBuffer, out: CharBuffer, endOfInput: Boolean)(implicit trace: Trace): UIO[CoderResult]
- def decode(in: ByteBuffer)(implicit trace: Trace): IO[CharacterCodingException, CharBuffer]
- def flush(out: CharBuffer)(implicit trace: Trace): UIO[CoderResult]
- def getClass(): Class[_ <: AnyVal]
- Definition Classes
- AnyVal → Any
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val javaDecoder: java.nio.charset.CharsetDecoder
- def malformedInputAction(implicit trace: Trace): UIO[CodingErrorAction]
- def maxCharsPerByte: Float
- def onMalformedInput(errorAction: CodingErrorAction)(implicit trace: Trace): UIO[Unit]
- def onUnmappableCharacter(errorAction: CodingErrorAction)(implicit trace: Trace): UIO[Unit]
- def replaceWith(replacement: String)(implicit trace: Trace): UIO[Unit]
- def replacement(implicit trace: Trace): UIO[String]
- def reset(implicit trace: Trace): UIO[Unit]
Resets this decoder, clearing any internal state.
- def toString(): String
- Definition Classes
- Any
- def transducer(bufSize: Int = 5000)(implicit trace: Trace): ZPipeline[Any, CharacterCodingException, Byte, Char]
Decodes a stream of bytes into characters according to this character set's encoding.
Decodes a stream of bytes into characters according to this character set's encoding.
Note the returned transducer is tied to this decoder and cannot be used concurrently.
- bufSize
The size of the internal buffer used for encoding. Must be at least 50.
- def unmappableCharacterAction(implicit trace: Trace): UIO[CodingErrorAction]