Uses of Interface
io.bytestreams.codec.core.Codec
Packages that use Codec
-
Uses of Codec in io.bytestreams.codec.core
Classes in io.bytestreams.codec.core that implement CodecModifier and TypeClassDescriptionclassA codec for fixed-length binary data.classBinaryNumberCodec<V extends Number>Codec forNumbers encoded as fixed-length big-endian binary.classA codec for boolean values encoded as a single byte.classChoiceCodec<V>A codec for discriminated unions where a class tag determines which codec to use for the value.classA codec for constant byte sequences such as magic numbers, version bytes, and protocol signatures.classA codec for fixed-length character strings.classA codec for fixed-length hexadecimal strings.classA codec for encoding and decoding fixed-length lists of values.classLazyCodec<V>A codec that defers resolution to first use, enabling recursive codec definitions.classA codec that always throws, indicating no implementation has been provided.classPairCodec<A,B> A codec that encodes and decodes a pair of values sequentially.classA codec that captures raw bytes during decoding, returning aRecordedvalue containing both the decoded value and the original wire bytes.classA codec for objects with sequential fields.classA codec for variable-length character strings that reads all remaining bytes from the stream.classA codec for variable-length hexadecimal strings that reads all remaining bytes from the stream.classA codec for encoding and decoding lists of values by reading items until EOF.classTaggedObjectCodec<T extends Tagged<T,K>, K> A codec for objects with tag-identified fields.classTripleCodec<A,B, C> A codec that encodes and decodes a triple of values sequentially.classA codec for variable-length values where the byte count is encoded as a prefix.classA codec for variable-length values where the item count is encoded as a prefix.Methods in io.bytestreams.codec.core that return CodecModifier and TypeMethodDescription<V> Codec<V> Maps this pair codec to a domain type.<V> Codec<V> TripleCodec.as(TriFunction<A, B, C, V> constructor, Function<V, A> getFirst, Function<V, B> getSecond, Function<V, C> getThird) Maps this triple codec to a domain type.Codecs.ascii()Creates a variable-length US-ASCII string codec.Codecs.ascii(int length) Creates a fixed-length US-ASCII string codec.Creates a variable-length US-ASCII string codec where the code point count is encoded as a prefix.Codecs.asciiInt(int digits) Creates a fixed-length ASCII numeric codec that decodes toInteger.Codecs.asciiLong(int digits) Creates a fixed-length ASCII numeric codec that decodes toLong.Codecs.bcdInt(int digits) Creates a fixed-length BCD (Binary Coded Decimal) codec that decodes toInteger.Codecs.bcdLong(int digits) Creates a fixed-length BCD (Binary Coded Decimal) codec that decodes toLong.static Codec<byte[]> Codecs.binary()Creates a variable-length binary codec that reads all remaining bytes from the stream.static Codec<byte[]> Codecs.binary(int length) Creates a fixed-length binary codec.static Codec<byte[]> Creates a variable-length binary codec where the byte count is encoded as a prefix.Codecs.bool()Creates a boolean codec (single byte: 0x00 = false, 0x01 = true).FieldSpec.codec()static Codec<byte[]> Codecs.constant(byte[] expected) Creates a constant codec that always writes the expected bytes on encode (ignoring the input value) and validates that the bytes match on decode.Codecs.ebcdic()Creates a variable-length EBCDIC (IBM1047) string codec.Codecs.ebcdic(int length) Creates a fixed-length EBCDIC (IBM1047) string codec.Creates a variable-length EBCDIC (IBM1047) string codec where the code point count is encoded as a prefix.Codecs.ebcdicInt(int digits) Creates a fixed-length EBCDIC numeric codec that decodes toInteger.Codecs.ebcdicLong(int digits) Creates a fixed-length EBCDIC numeric codec that decodes toLong.Codecs.float32()Creates a codec for float values (IEEE 754 single-precision, 4 bytes).Codecs.float64()Creates a codec for double values (IEEE 754 double-precision, 8 bytes).Codecs.hex()Creates a variable-length hex string codec.Codecs.hex(int length) Creates a fixed-length hex string codec.Creates a variable-length hex string codec where the hex digit count is encoded as a prefix.Codecs.int16()Creates a codec for signed short values (-32768 to 32767), encoded as 2-byte big-endian binary.Codecs.int32()Creates a codec for signed integer values (-2147483648 to 2147483647), encoded as 4-byte big-endian binary.Codecs.int64()Creates a codec for signed long values, encoded as 8-byte big-endian binary.Codecs.latin1()Creates a variable-length ISO-8859-1 (Latin-1) string codec.Codecs.latin1(int length) Creates a fixed-length ISO-8859-1 (Latin-1) string codec.Creates a variable-length ISO-8859-1 (Latin-1) string codec where the code point count is encoded as a prefix.static <V> Codec<V> Creates a lazy codec that defers resolution to first use, enabling recursive definitions.Creates a fixed-length list codec that encodes/decodes exactlylengthitems.Creates a variable-length list codec where the item count is encoded as a prefix.Creates a stream list codec that reads items until EOF.Creates a variable-length string codec with the specified charset.Creates a fixed-length string codec with the specified charset.Creates a variable-length string codec where the code point count is encoded as a prefix.static <V> Codec<V> Creates a variable-length codec where the byte count is encoded as a prefix.static <V> Codec<V> Codecs.prefixed(Codec<Integer> lengthCodec, ToIntFunction<V> lengthOf, IntFunction<Codec<V>> codecFactory) Creates a variable-length codec where the item count is encoded as a prefix.Codecs.uint16()Creates a codec for unsigned short values (0 to 65535), encoded as 2-byte big-endian binary.Codecs.uint32()Creates a codec for unsigned integer values (0 to 4294967295), encoded as 4-byte big-endian binary.Codecs.uint8()Creates a codec for unsigned byte values (0 to 255), encoded as 1-byte binary.Codecs.utf8()Creates a variable-length UTF-8 string codec.Codecs.utf8(int length) Creates a fixed-length UTF-8 string codec.Creates a variable-length UTF-8 string codec where the code point count is encoded as a prefix.default <U> Codec<U> Returns a new codec that maps between types using aConverter.default <U> Codec<U> Returns a new codec that applies bidirectional mapping functions to transform between value types.Methods in io.bytestreams.codec.core with parameters of type CodecModifier and TypeMethodDescriptionCreates a variable-length US-ASCII string codec where the code point count is encoded as a prefix.static Codec<byte[]> Creates a variable-length binary codec where the byte count is encoded as a prefix.static <T extends Tagged<T,K>, K>
TaggedObjectCodec.Builder<T, K> Creates a new builder for constructing a TaggedObjectCodec.static <V> ChoiceCodec.Builder<V> Creates a new builder for a choice codec that encodes discriminated unions.TaggedObjectCodec.Builder.defaultCodec(Codec<?> defaultCodec) Sets the default codec for unregistered tags.Creates a variable-length EBCDIC (IBM1047) string codec where the code point count is encoded as a prefix.static <T extends DataObject,V>
FieldSpec<T, V> Creates a FieldSpec backed by the object's internal map.static <T extends DataObject,V>
FieldSpec<T, V> Creates a FieldSpec backed by the object's internal map with a presence predicate.SequentialObjectCodec.Builder.field(String name, Codec<V> codec, Function<T, V> getter, BiConsumer<T, V> setter) Adds a required field to the codec.SequentialObjectCodec.Builder.field(String name, Codec<V> codec, Function<T, V> getter, BiConsumer<T, V> setter, Predicate<T> presence) Adds a field to the codec with a presence predicate.Creates a variable-length hex string codec where the hex digit count is encoded as a prefix.static ObjectReturns a structured representation of the given value by walking the codec tree.Creates a variable-length ISO-8859-1 (Latin-1) string codec where the code point count is encoded as a prefix.Creates a fixed-length list codec that encodes/decodes exactlylengthitems.Creates a variable-length list codec where the item count is encoded as a prefix.Creates a stream list codec that reads items until EOF.static <T,V> FieldSpec <T, V> FieldSpec.of(String name, Codec<V> codec, Function<T, V> getter, BiConsumer<T, V> setter) Creates a FieldSpec from explicit getter and setter functions.static <T,V> FieldSpec <T, V> FieldSpec.of(String name, Codec<V> codec, Function<T, V> getter, BiConsumer<T, V> setter, Predicate<T> presence) Creates a FieldSpec from explicit getter, setter, and presence predicate.static <T> RecordingCodec<T> Creates a new recording codec wrapping the given delegate.Creates a variable-length string codec where the code point count is encoded as a prefix.<S extends V>
ChoiceCodec.Builder<V> Registers a class/codec pair.static <A,B> PairCodec <A, B> Creates a pair codec that encodes and decodes two values sequentially.static <V> Codec<V> Creates a variable-length codec where the byte count is encoded as a prefix.static <V> Codec<V> Codecs.prefixed(Codec<Integer> lengthCodec, ToIntFunction<V> lengthOf, IntFunction<Codec<V>> codecFactory) Creates a variable-length codec where the item count is encoded as a prefix.Registers a codec for a specific tag.static <K> TaggedObjectCodec.Builder<TaggedData<K>, K> Creates a new builder for a tagged object codec usingTaggedData.static <T extends Tagged<T,K>, K>
TaggedObjectCodec.Builder<T, K> Creates a new builder for a tagged object codec.static <A,B, C> TripleCodec <A, B, C> Creates a triple codec that encodes and decodes three values sequentially.Creates a variable-length UTF-8 string codec where the code point count is encoded as a prefix.Method parameters in io.bytestreams.codec.core with type arguments of type CodecModifier and TypeMethodDescriptionstatic <V> Codec<V> Creates a lazy codec that defers resolution to first use, enabling recursive definitions.static <V> Codec<V> Codecs.prefixed(Codec<Integer> lengthCodec, ToIntFunction<V> lengthOf, IntFunction<Codec<V>> codecFactory) Creates a variable-length codec where the item count is encoded as a prefix.Constructors in io.bytestreams.codec.core with parameters of type CodecModifierConstructorDescriptionFixedListCodec(Codec<V> itemCodec, int length) Creates a new fixed list codec that usesArrayListfor decoded lists.Creates a new fixed list codec with a custom list factory.RecordingCodec(Codec<T> delegate) StreamListCodec(Codec<V> itemCodec) Creates a new stream list codec that usesArrayListfor decoded lists.Creates a new stream list codec with a custom list factory.