Index

A B C D E F H I L M O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form

A

API_VERSION - Static variable in class org.sofabuffers.sofab.Sofab
SofaBuffers core API version.
argument(String) - Static method in class org.sofabuffers.sofab.Sofab
The carrier a defect in the call is refused through: a SofabError.ARGUMENT SofabException, wrapped like Sofab.invalid(String) so it can leave a callback that declares no checked exception.
ARGUMENT - Enum constant in enum class org.sofabuffers.sofab.SofabError
Invalid caller argument (e.g. a field id outside 0..ID_MAX).
ARRAY_INIT_CAP - Static variable in class org.sofabuffers.sofab.Seq
Initial element capacity for an array whose length is not bounded by the schema.
ARRAY_MAX - Static variable in class org.sofabuffers.sofab.Sofab
Largest array element count / fixed-length byte count, 2^31 - 1 (INT32_MAX).
arrayBegin(int, ArrayKind, int) - Method in interface org.sofabuffers.sofab.Visitor
Start of an array field.
arrayBulk(int, ArrayKind, int) - Method in interface org.sofabuffers.sofab.Visitor
Offer to take an integer array's elements in bulk instead of one call at a time.
arrayBulkEnd(int, int) - Method in interface org.sofabuffers.sofab.Visitor
The bulk fill offered at Visitor.arrayBulk(int, ArrayKind, int) is complete: n elements were written into the destination.
ArrayKind - Enum Class in org.sofabuffers.sofab
Element category of an array field, reported to a Visitor via Visitor.arrayBegin(int, ArrayKind, int) just before the elements are delivered.

B

blob(int, int, byte[], int, int, Bound) - Method in class org.sofabuffers.sofab.PayloadAcc
Offer a chunk of a blob payload; returns the payload once the last chunk has arrived, null while more are expected.
blob(int, int, int, byte[], int, int) - Method in interface org.sofabuffers.sofab.Visitor
A chunk of a blob field.
BLOB - Enum constant in enum class org.sofabuffers.sofab.FixlenType
Arbitrary raw bytes.
boolsToLongs(List) - Static method in class org.sofabuffers.sofab.Seq
Convert a boolean wrapper array to the long[] the encoder writes.
Bound - Record Class in org.sofabuffers.sofab
Which of the two rules of CORELIB_PLAN §6.2.1 bounds this field: the schema's count/maxlen, or a receiver cap the deployment configured — and, with it, the number and the verdict a breach earns.
Bound(long, Bound.Rule) - Constructor for record class org.sofabuffers.sofab.Bound
Validates a bound however it is made: the rule must be stated, a stated number is at least 1, and only Bound.Rule.CALLER_CHECKED carries none (-1).
Bound.Rule - Enum Class in org.sofabuffers.sofab
Which of §6.2.1's answers a Bound states, and so its verdict.
BUFFER_FULL - Enum constant in enum class org.sofabuffers.sofab.SofabError
The output buffer is full and no FlushSink is available.
bufferSet(byte[], int) - Method in class org.sofabuffers.sofab.OStream
Replace the active buffer (typically from within a flush sink), resuming writes at offset in the new buffer.
bytesUsed() - Method in class org.sofabuffers.sofab.OStream
Number of bytes written to the active buffer since the last flush.

C

CALLER_CHECKED - Enum constant in enum class org.sofabuffers.sofab.Bound.Rule
The schema's maxlen, already enforced by the caller at the same header, so no number travels.
checkBlobLength(int, Bound) - Static method in class org.sofabuffers.sofab.PayloadAcc
Refuse an announced blob length the receiver's cap does not admit.
checkIndex(int, Bound) - Static method in class org.sofabuffers.sofab.Seq
The element-index rule, written once for all nine reservations — and published for the one site that has none to ride.
checkStringLength(int, Bound) - Static method in class org.sofabuffers.sofab.PayloadAcc
Refuse an announced string length the receiver's cap does not admit — the §6.2.1 comparison on its own, for a caller to make at the length word.
COMPLETE - Enum constant in enum class org.sofabuffers.sofab.DecodeStatus
The consumed bytes end exactly at a field boundary — a valid message.
copyOfBytesUsed() - Method in class org.sofabuffers.sofab.OStream
An exact-size copy of [0, bytesUsed()) — the bytes standing in the active buffer.

D

decode(byte[], int, int) - Static method in class org.sofabuffers.sofab.Utf8
Materialize b[off, off + len) as a String, rejecting a range that is not well-formed UTF-8.
DecodeStatus - Enum Class in org.sofabuffers.sofab
The outcome of a decode, per the finish-less three-valued model of CORELIB_PLAN §5.2.1 / MESSAGE_SPEC §7.

E

EMPTY_BYTES - Static variable in class org.sofabuffers.sofab.Seq
Shared zero-length arrays.
EMPTY_DOUBLES - Static variable in class org.sofabuffers.sofab.Seq
The shared empty double[]; see Seq.EMPTY_BYTES.
EMPTY_FLOATS - Static variable in class org.sofabuffers.sofab.Seq
The shared empty float[]; see Seq.EMPTY_BYTES.
EMPTY_INTS - Static variable in class org.sofabuffers.sofab.Seq
The shared empty int[]; see Seq.EMPTY_BYTES.
EMPTY_LONGS - Static variable in class org.sofabuffers.sofab.Seq
The shared empty long[]; see Seq.EMPTY_BYTES.
EMPTY_SHORTS - Static variable in class org.sofabuffers.sofab.Seq
The shared empty short[]; see Seq.EMPTY_BYTES.
ensureCap(byte[], int, int) - Static method in class org.sofabuffers.sofab.Seq
Enlarge a so index i can be written, doubling its length but never exceeding cap.
ensureCap(double[], int, int) - Static method in class org.sofabuffers.sofab.Seq
ensureCap(float[], int, int) - Static method in class org.sofabuffers.sofab.Seq
ensureCap(int[], int, int) - Static method in class org.sofabuffers.sofab.Seq
ensureCap(long[], int, int) - Static method in class org.sofabuffers.sofab.Seq
ensureCap(short[], int, int) - Static method in class org.sofabuffers.sofab.Seq
equals(Object) - Method in record class org.sofabuffers.sofab.Bound
Indicates whether some other object is "equal to" this one.
error() - Method in exception class org.sofabuffers.sofab.SofabException
The error category that caused this exception.
Example - Section in class org.sofabuffers.sofab.IStream
 
Example - Section in class org.sofabuffers.sofab.OStream
 

F

feed(byte[], int, int, Visitor) - Method in class org.sofabuffers.sofab.IStream
Feed a slice of encoded bytes, pushing decoded fields to visitor, and report where the decode stands.
feed(byte[], Visitor) - Method in class org.sofabuffers.sofab.IStream
Feed a whole chunk of encoded bytes, pushing decoded fields to visitor, and report where the decode stands.
fixlenBegin(int, FixlenType, int) - Method in interface org.sofabuffers.sofab.Visitor
Start of a fixlen field — string, blob, fp32 or fp64.
FixlenType - Enum Class in org.sofabuffers.sofab
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").
flush() - Method in class org.sofabuffers.sofab.OStream
Flush any pending bytes to the sink (if one is set) and report how many bytes were pending.
flush(byte[], int, int) - Method in interface org.sofabuffers.sofab.FlushSink
Consume length bytes starting at offset in data.
FlushSink - Interface in org.sofabuffers.sofab
Sink that receives buffered bytes when an OStream's buffer fills (or when OStream.flush() is called).
fp32(int, float) - Method in interface org.sofabuffers.sofab.Visitor
A 32-bit float field, or an fp32 array element.
FP32 - Enum constant in enum class org.sofabuffers.sofab.ArrayKind
IEEE-754 32-bit float elements, delivered through Visitor.fp32(int, float).
FP32 - Enum constant in enum class org.sofabuffers.sofab.FixlenType
32-bit IEEE-754 float, little-endian on the wire.
fp64(int, double) - Method in interface org.sofabuffers.sofab.Visitor
A 64-bit float field, or an fp64 array element.
FP64 - Enum constant in enum class org.sofabuffers.sofab.ArrayKind
IEEE-754 64-bit double elements, delivered through Visitor.fp64(int, double).
FP64 - Enum constant in enum class org.sofabuffers.sofab.FixlenType
64-bit IEEE-754 double, little-endian on the wire.

H

hashCode() - Method in record class org.sofabuffers.sofab.Bound
Returns a hash code value for this object.

I

ID_MAX - Static variable in class org.sofabuffers.sofab.Sofab
Largest valid field id, 2^31 - 1 (INT32_MAX).
INCOMPLETE - Enum constant in enum class org.sofabuffers.sofab.DecodeStatus
The consumed bytes end inside a field or with an open sequence; more bytes could complete the message.
invalid(String) - Static method in class org.sofabuffers.sofab.Sofab
The carrier a Visitor rejects malformed input through: an SofabError.INVALID_MSG SofabException, wrapped so it can leave a callback that declares no checked exception.
INVALID - Enum constant in enum class org.sofabuffers.sofab.DecodeStatus
The bytes are malformed regardless of what follows — the third outcome of §5.2.1, and the one IStream.feed(byte[], Visitor) does not return: it throws a SofabException with SofabError.INVALID_MSG instead, then latches the verdict so no continuation can revise it and every further feed throws again until IStream.reset().
INVALID_MSG - Enum constant in enum class org.sofabuffers.sofab.SofabError
The input bytes are not a valid Sofab message (varint overflow, bad type tag, zero-length array, dangling sequence end, ...).
IStream - Class in org.sofabuffers.sofab
Streaming SofaBuffers decoder.
IStream() - Constructor for class org.sofabuffers.sofab.IStream
Create a fresh decoder ready to accept a new message.

L

LIMIT_EXCEEDED - Enum constant in enum class org.sofabuffers.sofab.SofabError
A well-formed message field exceeds a receiver-configured decode limit for an unbounded (dynamic) field — one whose schema declares no count/maxlen.
limitExceeded(String) - Static method in class org.sofabuffers.sofab.Sofab
The carrier a receiver-side limit (§6.2.1) is refused through: a SofabError.LIMIT_EXCEEDED SofabException, wrapped like Sofab.invalid(String) so it can leave a callback that declares no checked exception.

M

max() - Method in record class org.sofabuffers.sofab.Bound
Returns the value of the max record component.
MAX_DEPTH - Static variable in class org.sofabuffers.sofab.Sofab
Maximum nested-sequence depth (§4.9 / §6.2).
MIN_OUTPUT_BUFFER - Static variable in class org.sofabuffers.sofab.Sofab
Smallest output buffer this port accepts for streaming (CORELIB_PLAN §5.1).

O

orEmpty(List) - Static method in class org.sofabuffers.sofab.Seq
The null-absorbing identity a wrapper array is read through on the encode side — by the serialize loop and by the all-default predicate alike.
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.
OStream - Class in org.sofabuffers.sofab
Streaming SofaBuffers encoder writing into a caller-provided byte buffer.
OStream(byte[]) - Constructor for class org.sofabuffers.sofab.OStream
Create an encoder over buffer with no flush sink.
OStream(byte[], int) - Constructor for class org.sofabuffers.sofab.OStream
Like OStream(byte[]) but begin writing at offset bytes into the buffer, reserving room for a lower-layer header.
OStream(byte[], int, FlushSink) - Constructor for class org.sofabuffers.sofab.OStream
Create an encoder with a flush sink.
overScratch(int) - Static method in class org.sofabuffers.sofab.OStream
An encoder over a per-thread scratch buffer of at least size bytes — the mechanism behind a one-shot encode() that returns a fresh array without re-allocating (and re-zeroing) a worst-case buffer per call.

P

PayloadAcc - Class in org.sofabuffers.sofab
Reassembles a string or blob payload that arrives in more than one piece — the support layer, not the codec.
PayloadAcc() - Constructor for class org.sofabuffers.sofab.PayloadAcc
A fresh accumulator, holding no payload and no buffer.
placeElem(List, int, T, T, Bound) - Static method in class org.sofabuffers.sofab.Seq
Place a leaf element — a wrapper array's string or blob — at the index its wire id names, growing the list and filling the gaps that omitted interior elements left (MESSAGE_SPEC §5.1, §2).

R

raw() - Method in enum class org.sofabuffers.sofab.FixlenType
The 3-bit wire tag for this sub-type.
receiver(long) - Static method in record class org.sofabuffers.sofab.Bound
The receiver cap this deployment configured for a field the schema leaves unbounded — one of the three max_dyn_* limits of §6.2.1.
RECEIVER - Enum constant in enum class org.sofabuffers.sofab.Bound.Rule
The deployment's receiver cap, compared by the call: SofabError.LIMIT_EXCEEDED past it.
reserveElem(List, int, Supplier, Bound) - Static method in class org.sofabuffers.sofab.Seq
Reserve a framed element — the slot a wrapper array's struct, union or nested-array element is routed into: bound the index, then grow the list to id + 1, giving each new slot its own element from make (MESSAGE_SPEC §5.1, §2).
reserveRow(List, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
Reserve the row at index id of a matrix — an array whose elements are themselves arrays — as an empty row, growing the outer list with empty rows so that a gap in the ids decodes as an empty row instead of shifting every later row down by one.
reserveRowBytes(List, int, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
Seq.reserveRow(List, int, Bound) for a primitive row: the same id-keyed placement and the same gap fill with the empty row, but the new row is handed back so the caller can fill it by index instead of reading it out of the list once per element.
reserveRowDoubles(List, int, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
reserveRowFloats(List, int, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
reserveRowInts(List, int, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
reserveRowLongs(List, int, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
reserveRowShorts(List, int, int, Bound) - Static method in class org.sofabuffers.sofab.Seq
reset() - Method in class org.sofabuffers.sofab.IStream
Return this decoder to its just-constructed state so it can decode another message.
reset(byte[]) - Method in class org.sofabuffers.sofab.OStream
Return this stream to its just-constructed state, writing into buffer from its start, so a caller encoding many messages in a row (a server loop, the generated encode helper) can hold one instance instead of letting each encode allocate and immediately discard one.
reset(List) - Static method in class org.sofabuffers.sofab.Seq
Empty a list in place, keeping its capacity, and materialize one only when the field is null.
rule() - Method in record class org.sofabuffers.sofab.Bound
Returns the value of the rule record component.

S

schema(long) - Static method in record class org.sofabuffers.sofab.Bound
The bound the schema declares for this field — an array's count, or a string/blob's maxlen — compared by the call it is handed to.
SCHEMA - Enum constant in enum class org.sofabuffers.sofab.Bound.Rule
The schema's own count or maxlen, compared by the call: SofabError.INVALID_MSG past it.
SCHEMA_BOUNDED - Static variable in record class org.sofabuffers.sofab.Bound
The schema bounds this string or blob and the caller has already enforced its maxlen at the same header, as Sofab.invalid(String) (MESSAGE_SPEC §7.1), so §6.2.1 forbids a receiver cap on it and there is no second number for PayloadAcc to compare.
Seq - Class in org.sofabuffers.sofab
Element placement and array growth for generated decode destinations — the support layer, not the codec.
sequenceBegin(int) - Method in interface org.sofabuffers.sofab.Visitor
Start of a nested sequence (a new id scope).
sequenceEnd() - Method in interface org.sofabuffers.sofab.Visitor
End of the current nested sequence.
signed(int, long) - Method in interface org.sofabuffers.sofab.Visitor
A signed-integer field, or a signed array element.
SIGNED - Enum constant in enum class org.sofabuffers.sofab.ArrayKind
Signed-integer elements, delivered through Visitor.signed(int, long).
Sofab - Class in org.sofabuffers.sofab
Library-level constants for the SofaBuffers (sofab) core.
SofabError - Enum Class in org.sofabuffers.sofab
Error categories raised by the encoder and decoder.
SofabException - Exception Class in org.sofabuffers.sofab
Thrown by the encoder and decoder on protocol or buffer errors.
SofabException(SofabError) - Constructor for exception class org.sofabuffers.sofab.SofabException
Create an exception for the given error category.
SofabException(SofabError, String) - Constructor for exception class org.sofabuffers.sofab.SofabException
Create an exception for the given error category with extra detail.
string(int, int, byte[], int, int, Bound) - Method in class org.sofabuffers.sofab.PayloadAcc
Offer a chunk of a string payload; returns the decoded string once the last chunk has arrived, null while more are expected.
string(int, int, int, byte[], int, int) - Method in interface org.sofabuffers.sofab.Visitor
A chunk of a string field (raw UTF-8 bytes, no NUL terminator).
STRING - Enum constant in enum class org.sofabuffers.sofab.FixlenType
UTF-8 / raw text, no NUL terminator on the wire.

T

toString() - Method in record class org.sofabuffers.sofab.Bound
A short description naming which rule this states, for diagnostics.

U

unsigned(int, long) - Method in interface org.sofabuffers.sofab.Visitor
An unsigned-integer field, or an unsigned array element.
UNSIGNED - Enum constant in enum class org.sofabuffers.sofab.ArrayKind
Unsigned-integer elements, delivered through Visitor.unsigned(int, long).
Utf8 - Class in org.sofabuffers.sofab
UTF-8 validation — and, on the decode side, materialization — of a raw byte range, for both sides of a string field (CORELIB_PLAN §6.4).

V

valid(byte[], int, int) - Static method in class org.sofabuffers.sofab.Utf8
Reports whether b[i..end) is well-formed UTF-8.
valueOf(String) - Static method in enum class org.sofabuffers.sofab.ArrayKind
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class org.sofabuffers.sofab.Bound.Rule
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class org.sofabuffers.sofab.DecodeStatus
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class org.sofabuffers.sofab.FixlenType
Returns the enum constant of this class with the specified name.
valueOf(String) - Static method in enum class org.sofabuffers.sofab.SofabError
Returns the enum constant of this class with the specified name.
values() - Static method in enum class org.sofabuffers.sofab.ArrayKind
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class org.sofabuffers.sofab.Bound.Rule
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class org.sofabuffers.sofab.DecodeStatus
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class org.sofabuffers.sofab.FixlenType
Returns an array containing the constants of this enum class, in the order they are declared.
values() - Static method in enum class org.sofabuffers.sofab.SofabError
Returns an array containing the constants of this enum class, in the order they are declared.
Visitor - Interface in org.sofabuffers.sofab
Receives decoded fields pushed by an IStream.

W

writeArrayFp32(int, float[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of 32-bit floats.
writeArrayFp64(int, double[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of 64-bit floats.
writeArraySigned(int, byte[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of signed 8-bit integers.
writeArraySigned(int, int[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of signed 32-bit integers.
writeArraySigned(int, long[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of signed 64-bit integers.
writeArraySigned(int, short[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of signed 16-bit integers.
writeArrayUnsigned(int, byte[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of unsigned 8-bit integers (each element zero-extended).
writeArrayUnsigned(int, int[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of unsigned 32-bit integers (each element zero-extended).
writeArrayUnsigned(int, long[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of unsigned 64-bit integers (each long treated as an unsigned value).
writeArrayUnsigned(int, short[]) - Method in class org.sofabuffers.sofab.OStream
Write an array of unsigned 16-bit integers (each element zero-extended).
writeBlob(int, byte[]) - Method in class org.sofabuffers.sofab.OStream
Write a binary blob field.
writeBlob(int, byte[], int, int) - Method in class org.sofabuffers.sofab.OStream
Write a slice of a byte array as a binary blob field.
writeBoolean(int, boolean) - Method in class org.sofabuffers.sofab.OStream
Write a boolean as an unsigned 0 / 1.
writeFixlen(int, byte[], int, int, FixlenType) - Method in class org.sofabuffers.sofab.OStream
Write a fixed-length field: the id header, a (len << 3) | subtype length header, then length raw bytes from data (already in wire / little-endian order for floats).
writeFp32(int, float) - Method in class org.sofabuffers.sofab.OStream
Write a 32-bit float field.
writeFp64(int, double) - Method in class org.sofabuffers.sofab.OStream
Write a 64-bit float field.
writeSequenceBeginLazy(int) - Method in class org.sofabuffers.sofab.OStream
Open a nested sequence with the given field id, whose header is held back until the sequence turns out to have content.
writeSequenceEnd() - Method in class org.sofabuffers.sofab.OStream
Close the most recently opened nested sequence, letting it vanish if it received no content.
writeSequenceEndKeep() - Method in class org.sofabuffers.sofab.OStream
Close the most recently opened nested sequence, keeping its frame even when it received no content.
writeSigned(int, long) - Method in class org.sofabuffers.sofab.OStream
Write a signed-integer field (ZigZag + varint).
writeString(int, String) - Method in class org.sofabuffers.sofab.OStream
Write a string field (raw UTF-8 bytes, no NUL on the wire).
writeString(int, String, int) - Method in class org.sofabuffers.sofab.OStream
Write a string field whose UTF-8 byte length must not exceed maxlen.
writeUnsigned(int, long) - Method in class org.sofabuffers.sofab.OStream
Write an unsigned-integer field.
A B C D E F H I L M O P R S T U V W 
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form