Package org.sofabuffers.sofab
package org.sofabuffers.sofab
SofaBuffers (Sofab) core stream library for Java — a dependency-free,
allocation-light, streaming implementation of the SofaBuffers serialization
format.
This package is the runtime stream core (equivalent to the C
corelib's istream / ostream), meant to be driven by
generated code: a schema-driven generator emits one class per message plus the
serialize / deserialize pair that calls the primitives here,
the same way
protobuf-java's generated code calls CodedOutputStream /
CodedInputStream.
OStream— streaming encoder writing into a caller buffer, with an optionalFlushSink.IStream— streaming decoder pushing fields to aVisitor(visitor pattern).Sofab— library constants, includingSofab.API_VERSION.
The wire format is specified, language-neutrally, in the SofaBuffers documentation. The unit tests use the exact byte vectors from the C corelib's reference suite to guarantee byte-for-byte interoperability with the C, C++, Rust and Go implementations.
-
ClassDescriptionElement category of an array field, reported to a
VisitorviaVisitor.arrayBegin(int, ArrayKind, int)just before the elements are delivered.Which of the two rules of CORELIB_PLAN §6.2.1 bounds this field: the schema'scount/maxlen, or a receiver cap the deployment configured — and, with it, the number and the verdict a breach earns.Which of §6.2.1's answers aBoundstates, and so its verdict.The outcome of a decode, per the finish-less three-valued model of CORELIB_PLAN §5.2.1 / MESSAGE_SPEC §7.Sub-type of a fixed-length field — the 3-bit tag encoded in the low bits of a fixlen length header (see the SofaBuffers documentation, "Fixlen Length and Type").Sink that receives buffered bytes when anOStream's buffer fills (or whenOStream.flush()is called).Streaming SofaBuffers decoder.Streaming SofaBuffers encoder writing into a caller-provided byte buffer.Reassembles astringorblobpayload that arrives in more than one piece — the support layer, not the codec.Element placement and array growth for generated decode destinations — the support layer, not the codec.Library-level constants for the SofaBuffers (sofab) core.Error categories raised by the encoder and decoder.Thrown by the encoder and decoder on protocol or buffer errors.UTF-8 validation — and, on the decode side, materialization — of a raw byte range, for both sides of astringfield (CORELIB_PLAN §6.4).Receives decoded fields pushed by anIStream.