public class AtomLayerOverflow
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.nio.ByteBuffer |
OVERFLOW_MARKER |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<java.nio.ByteBuffer> |
mergeOverflowAtoms(java.util.List<java.nio.ByteBuffer> a,
java.util.List<java.nio.ByteBuffer> b)
Merge the provided atoms until an overflow marker is encountered.
|
static java.util.List<java.nio.ByteBuffer> |
trimToFirstOverflow(java.util.List<java.nio.ByteBuffer> atoms) |
static java.util.List<java.nio.ByteBuffer> |
trimToSize(java.util.List<java.nio.ByteBuffer> atoms,
int limit)
If the serialized size of
atoms is <=limit then this method returns atoms with
no modifications. |
public static java.util.List<java.nio.ByteBuffer> trimToSize(java.util.List<java.nio.ByteBuffer> atoms,
int limit)
If the serialized size of atoms is <=limit then this method returns atoms with
no modifications. Otherwise, this method returns the maximum prefix of atoms such that its
serialized size will be <=limit. The returned prefix will also have OVERFLOW_MARKER appended to
the end. OVERFLOW_MARKER is taken into account when calculating serialized size, so the return value of
this method is guaranteed to be serialized to <=limit bytes.
atoms - a list of atoms, possibly nulllimit - the maximum serialized size of atomsatoms if the serialized size of atoms is <= limit, otherwise a prefix
of atoms OVERFLOW_MARKER. Returns null if atoms is nullpublic static java.util.List<java.nio.ByteBuffer> trimToFirstOverflow(java.util.List<java.nio.ByteBuffer> atoms)
public static java.util.List<java.nio.ByteBuffer> mergeOverflowAtoms(java.util.List<java.nio.ByteBuffer> a,
java.util.List<java.nio.ByteBuffer> b)