Package-level declarations

Types

Link copied to clipboard
sealed class Decoder<C : EncoderDecoder.Config>(val config: C)

Decode things.

Link copied to clipboard
sealed class Encoder<C : EncoderDecoder.Config>(config: C) : Decoder<C>

Encode things.

Link copied to clipboard
abstract class EncoderDecoder<C : EncoderDecoder.Config>(config: C) : Encoder<C>

Base abstraction which exposes Encoder and Decoder (sealed classes) such that inheriting classes must implement both.

Link copied to clipboard
open class EncodingException : RuntimeException

The EncodingException class is a generic encoding exception class that provide type safety for all the encoding related exception classes that extend from it.

Link copied to clipboard

This exception is thrown to indicate that an EncoderDecoder.Config pre-calculation step for an operation failed.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPEALIAS])
annotation class ExperimentalEncodingApi

Denotes an api as experimental, such that it may change inadvertently without notice.

Link copied to clipboard

This exception is thrown to indicate an encoding/decoding operation failed due to malformed input, such as an invalid character or byte sequence.

Functions

Link copied to clipboard
inline fun <C : EncoderDecoder.Config, T : EncoderDecoder.Feed<C>?, V> T.use(block: (T) -> V): V

Executes the given block function and then closes the Feed by either: