| Package | Description |
|---|---|
| net.openhft.chronicle.bytes | |
| net.openhft.chronicle.bytes.algo | |
| net.openhft.chronicle.bytes.internal | |
| net.openhft.chronicle.bytes.ref | |
| net.openhft.chronicle.bytes.util |
| Modifier and Type | Interface and Description |
|---|---|
interface |
BytesStore<B extends BytesStore<B,U>,U>
Reference to a fixed-capacity region of memory.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
Bytes<U>
Mutable buffer for raw byte data with separate 63-bit read and write cursors.
|
| Modifier and Type | Class and Description |
|---|---|
class |
AbstractBytes<U>
Provides a base implementation of
Bytes with cursor management,
optional bounds checking and default text formatting support. |
class |
GuardedNativeBytes<U>
Debugging wrapper that prefixes each primitive written with a type code and checks it on reads.
|
class |
HexDumpBytes
Bytes implementation that records all writes and produces a formatted hexadecimal dump of the data. |
class |
MappedBytes
A specialised
Bytes implementation backed by a memory-mapped file. |
class |
MappedBytesStore
NativeBytesStore backed by a region of a memory-mapped file. |
class |
NativeBytes<U>
VanillaBytes backed by native (off heap) memory or a direct
ByteBuffer. |
class |
OnHeapBytes
VanillaBytes backed by an on heap byte[]. |
class |
PointerBytesStore
NativeBytesStore providing a view over externally managed memory. |
class |
SubBytes<U>
Represents a fixed size view over a region of another
BytesStore. |
class |
UncheckedBytes<U>
A wrapper around another
Bytes instance that bypasses most bounds
checks on read and write operations. |
class |
UncheckedNativeBytes<U>
Provides unchecked access to a native
BytesStore. |
class |
VanillaBytes<U>
Base implementation of
Bytes backed by a fixed-capacity
BytesStore. |
| Modifier and Type | Field and Description |
|---|---|
protected @NotNull BytesStore<?,U> |
UncheckedNativeBytes.bytesStore |
protected @NotNull BytesStore<?,U> |
AbstractBytes.bytesStore |
| Modifier and Type | Method and Description |
|---|---|
static <B extends BytesStore<B,T>,T> |
BytesStore.empty()
Provides an empty, fixed-sized and immutable BytesStore.
|
static <A extends BytesStore<A,B>,B> |
BytesStore.from(@NotNull BytesStore<A,B> cs)
Returns a BytesStore using the bytes in another specified BytesStore.
|
| Modifier and Type | Method and Description |
|---|---|
@Nullable BytesStore<?,?> |
Byteable.bytesStore() |
@NotNull BytesStore<?,Void> |
HexDumpBytes.bytesStore() |
@Nullable BytesStore<?,U> |
UncheckedNativeBytes.bytesStore() |
BytesStore<?,?> |
BytesRingBuffer.bytesStore()
Retrieves the BytesStore that backs this buffer.
|
default @Nullable BytesStore<?,?> |
BytesStore.bytesStore() |
@Nullable BytesStore<?,U> |
Bytes.bytesStore()
Returns the backing BytesStore that this Bytes object wraps.
|
@NotNull BytesStore<?,U> |
AbstractBytes.bytesStore() |
BytesStore<?,?> |
RingBufferReader.byteStore()
Retrieves the
BytesStore instance that backs the Ring Buffer. |
@NotNull BytesStore<Bytes<U>,U> |
VanillaBytes.copy() |
BytesStore<Bytes<Void>,Void> |
HexDumpBytes.copy() |
@NotNull BytesStore<Bytes<U>,U> |
UncheckedNativeBytes.copy() |
@NotNull BytesStore<Bytes<U>,U> |
UncheckedBytes.copy()
Unsupported for unchecked views as copying would reintroduce checks.
|
BytesStore<B,U> |
BytesStore.copy()
Creates and returns a copy of this BytesStore.
|
BytesStore<Bytes<U>,U> |
Bytes.copy()
Creates and returns a deep copy of this Bytes object, including the data between
RandomCommon.readPosition() and RandomCommon.readLimit(). |
static BytesStore<?,ByteBuffer> |
BytesStore.elasticByteBuffer(int size,
long maxSize)
Creates a flexible ByteBuffer instance that resides in native memory.
|
static <B extends BytesStore<B,T>,T> |
BytesStore.empty()
Provides an empty, fixed-sized and immutable BytesStore.
|
static @NotNull BytesStore<?,ByteBuffer> |
BytesStore.follow(@NotNull ByteBuffer bb)
Returns a store that references
bb without assuming ownership. |
static <T> BytesStore<?,T> |
BytesStore.forFields(Object o,
String groupName,
int padding)
Provides a BytesStore that allows access to a group of fields in a given object.
|
static <A extends BytesStore<A,B>,B> |
BytesStore.from(@NotNull BytesStore<A,B> cs)
Returns a BytesStore using the bytes in another specified BytesStore.
|
static BytesStore<?,?> |
BytesStore.from(@NotNull CharSequence cs)
Converts a CharSequence into a BytesStore.
|
static BytesStore<?,byte[]> |
BytesStore.from(@NotNull String cs)
Converts a String into a BytesStore.
|
static BytesStore<?,Void> |
BytesStore.lazyNativeBytesStoreWithFixedCapacity(long capacity)
Creates a lazily initialized BytesStore instance with a fixed capacity that resides in native memory.
|
static BytesStore<?,Void> |
BytesStore.nativeStore(long capacity)
This is an elastic native store.
|
static BytesStore<?,Void> |
BytesStore.nativeStoreFrom(byte[] bytes)
Creates and returns a new BytesStore that resides in native memory whereby the contents and
size of the native memory is determined by the provided
bytes array. |
static BytesStore<?,Void> |
BytesStore.nativeStoreWithFixedCapacity(long capacity)
Creates a BytesStore instance with a fixed capacity that resides in native memory.
|
default @NotNull BytesStore<?,?> |
RandomDataInput.subBytes(long start,
long length)
Returns a new BytesStore that is a subsequence of this byte sequence, starting at the specified index and of the specified length.
|
static BytesStore<?,byte[]> |
BytesStore.wrap(byte[] bytes)
Wraps a byte array into a BytesStore.
|
static @NotNull BytesStore<?,ByteBuffer> |
BytesStore.wrap(@NotNull ByteBuffer bb)
Takes ownership of
bb and returns a store backed by it. |
| Modifier and Type | Method and Description |
|---|---|
@NotNull MappedBytesStore |
MappedFile.acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
BytesStore<?,?> oldByteStore)
Acquires a byte store at the specified position with the ability to re-use an existing byte store.
|
abstract @NotNull MappedBytesStore |
MappedFile.acquireByteStore(net.openhft.chronicle.core.io.ReferenceOwner owner,
long position,
BytesStore<?,?> oldByteStore,
@NotNull MappedBytesStoreFactory mappedBytesStoreFactory)
Acquires a byte store at the specified position with the ability to re-use an existing byte store,
and specify a custom byte store factory.
|
default B |
ByteStringAppender.append8bit(@NotNull BytesStore<?,?> bs)
Appends the content of
bs assuming one byte per character (ISO-8859-1). |
@NotNull Bytes<U> |
VanillaBytes.append8bit(@NotNull BytesStore<?,?> bs) |
Bytes<Void> |
HexDumpBytes.append8bit(@NotNull BytesStore<?,?> bs) |
default B |
ByteStringAppender.append8bit(@NotNull BytesStore<?,?> bs,
long start,
long end)
Appends a portion of a BytesStore to this in ISO-8859-1 format.
|
Bytes<Void> |
HexDumpBytes.append8bit(@NotNull BytesStore<?,?> bs,
long start,
long end) |
protected void |
GuardedNativeBytes.bytesStore(@NotNull BytesStore<?,U> bytesStore) |
protected void |
NativeBytes.bytesStore(@NotNull BytesStore<?,U> bytesStore) |
protected void |
AbstractBytes.bytesStore(BytesStore<?,U> bytesStore) |
void |
VanillaBytes.bytesStore(@NotNull BytesStore byteStore,
long offset,
long length) |
void |
Byteable.bytesStore(@NotNull BytesStore bytesStore,
long offset,
long length)
Map this object onto a region of
bytesStore. |
void |
NativeBytes.bytesStore(@NotNull BytesStore byteStore,
long offset,
long length) |
default boolean |
BytesStore.contentEquals(@Nullable BytesStore<?,?> bytesStore)
Returns if the content of this BytesStore is the same as the content of a specified BytesStore.
|
static void |
BytesUtil.copy8bit(BytesStore<?,?> bs,
long addressForWrite,
long length)
Copies 8-bit data from a BytesStore object to a specified address.
|
long |
StreamingDataInput.copyTo(@NotNull BytesStore<?,?> to)
Copies the data from the input stream to the provided BytesStore.
|
default long |
BytesStore.copyTo(@NotNull BytesStore<?,?> store)
Returns the number of bytes that were copied from this BytesStore to a destination BytesStore.
|
default long |
Bytes.copyTo(@NotNull BytesStore<?,?> targetByteStore)
Copies bytes from this Bytes object into the provided
targetByteStore. |
boolean |
VanillaBytes.equalBytes(@NotNull BytesStore<?,?> bytesStore,
long length) |
default boolean |
BytesStore.equalBytes(@NotNull BytesStore<?,?> bytesStore,
long length)
Returns if a portion of a specified BytesStore matches this BytesStore.
|
static <A extends BytesStore<A,B>,B> |
BytesStore.from(@NotNull BytesStore<A,B> cs)
Returns a BytesStore using the bytes in another specified BytesStore.
|
default int |
Bytes.indexOf(@NotNull BytesStore<?,?> source,
int fromIndex)
Returns the lowest index value starting from the provided
fromIndex for which the contents of this
Bytes object equals the provided source , or -1 if no such index value exists. |
protected static <T> long |
NativeBytes.maxCapacityFor(@NotNull BytesStore<?,T> bs) |
static @NotNull BytesRingBuffer |
BytesRingBuffer.newInstance(@NotNull BytesStore<?,Void> bytesStore)
Factory method to create a new ring buffer.
|
static @NotNull MultiReaderBytesRingBuffer |
BytesRingBuffer.newInstance(@NotNull BytesStore<?,Void> bytesStore,
int numReaders)
Factory method to create a ring buffer with multiple readers.
|
boolean |
BytesRingBuffer.offer(@NotNull BytesStore<?,?> bytes0)
Attempts to write the content of
bytes0 as a single message. |
static void |
AppendableUtil.parseUtf8(@NotNull BytesStore<?,?> bs,
StringBuilder sb,
boolean utf,
int length)
Decodes
length bytes from bs as either UTF-8 or ISO-8859-1
and appends the text to sb. |
B |
BytesPrepender.prewrite(BytesStore<?,?> bytes)
Writes a BytesStore instance backward in binary format.
|
@NotNull Bytes<Void> |
HexDumpBytes.prewrite(BytesStore<?,?> bytes) |
@NotNull Bytes<U> |
UncheckedNativeBytes.prewrite(@NotNull BytesStore<?,?> bytes) |
@NotNull Bytes<U> |
AbstractBytes.prewrite(@NotNull BytesStore<?,?> bytes) |
default boolean |
BytesStore.startsWith(@Nullable BytesStore<?,?> bytesStore)
Returns if the content of this BytesStore starts with bytes equal to the content of a specified BytesStore.
|
boolean |
AbstractBytes.startsWith(@Nullable BytesStore<?,?> bytesStore) |
static <U> VanillaBytes<U> |
VanillaBytes.wrap(BytesStore<?,U> bytesStore)
Factory method for creating an instance of VanillaBytes that wraps the provided BytesStore.
|
static <T> @NotNull NativeBytes<T> |
NativeBytes.wrapWithNativeBytes(@NotNull BytesStore<?,T> bs,
long capacity)
Wraps the provided BytesStore with a new instance of NativeBytes with the specified capacity.
|
default S |
StreamingDataOutput.write(@NotNull BytesStore<?,?> bytes)
Writes all available data from the specified
BytesStore into the output stream. |
Bytes<Void> |
HexDumpBytes.write(@NotNull BytesStore<?,?> bytes) |
Bytes<U> |
AbstractBytes.write(@NotNull BytesStore<?,?> bytes) |
default S |
StreamingDataOutput.write(@NotNull BytesStore<?,?> bytes,
long readOffset,
long length)
Writes the specified number of bytes from the provided
BytesStore into the output stream,
starting from the given read offset. |
@NotNull Bytes<U> |
VanillaBytes.write(@NotNull BytesStore<?,?> bytes,
long offset,
long length) |
@NotNull Bytes<Void> |
HexDumpBytes.write(@NotNull BytesStore<?,?> bytes,
long offset,
long length) |
@NotNull Bytes<U> |
UncheckedBytes.write(@NotNull BytesStore<?,?> bytes,
long offset,
long length) |
default R |
RandomDataOutput.write(long offsetInRDO,
@NotNull BytesStore<?,?> bytes)
Copies the entire content of the provided BytesStore into this data output.
|
Bytes<U> |
UncheckedNativeBytes.write8bit(@Nullable BytesStore<?,?> bs) |
@NotNull Bytes<U> |
AbstractBytes.write8bit(@Nullable BytesStore<?,?> bs) |
long |
RandomDataOutput.write8bit(long position,
@NotNull BytesStore<?,?> bs)
Writes a BytesStore instance to this RandomDataOutput at the given position.
|
long |
HexDumpBytes.write8bit(long position,
@NotNull BytesStore<?,?> bs) |
long |
UncheckedNativeBytes.write8bit(long position,
@NotNull BytesStore<?,?> bs) |
long |
AbstractBytes.write8bit(long position,
@NotNull BytesStore<?,?> bs) |
static long |
BytesUtil.writeStopBit(BytesStore<?,?> bs,
long offset,
long n)
Writes a variable-length integer to a specific position in a BytesStore using the stop bit encoding.
|
default void |
StreamingDataOutput.writeWithLength(@NotNull BytesStore<?,?> bytes)
Writes data from the provided RandomDataInput into this Bytes object with prefixed length.
|
void |
HexDumpBytes.writeWithLength(@NotNull BytesStore<?,?> bytes) |
| Constructor and Description |
|---|
GuardedNativeBytes(@NotNull BytesStore<?,?> store,
long capacity)
Constructs a new GuardedNativeBytes instance backed by the specified BytesStore and with the specified capacity.
|
NativeBytes(@NotNull BytesStore<?,?> store)
Constructs a new instance of NativeBytes with the specified BytesStore and the store's capacity.
|
NativeBytes(@NotNull BytesStore<?,?> store,
long capacity)
Constructs a new instance of NativeBytes with the specified BytesStore and capacity.
|
OnHeapBytes(@NotNull BytesStore<?,?> bytesStore,
boolean elastic)
Constructs an instance backed by
bytesStore. |
SubBytes(@NotNull BytesStore<?,?> bytesStore,
long start,
long capacity)
Creates a sub region view of the supplied
bytesStore. |
VanillaBytes(@NotNull BytesStore<?,?> bytesStore)
Constructor for creating an instance of VanillaBytes with the given BytesStore,
using its write position and write limit.
|
VanillaBytes(@NotNull BytesStore<?,?> bytesStore,
long writePosition,
long writeLimit)
Constructor for creating an instance of VanillaBytes with the given BytesStore,
write position, and write limit.
|
| Modifier and Type | Interface and Description |
|---|---|
interface |
BytesStoreHash<B extends BytesStore>
Represents a function that computes a 64-bit hash value from a
BytesStore. |
| Modifier and Type | Method and Description |
|---|---|
long |
OptimisedBytesStoreHash.applyAsLong(@NotNull BytesStore<?,?> store)
Hashes a BytesStore.
|
long |
XxHash.applyAsLong(BytesStore<?,?> bytes)
Calculates the hash code of the given byte store.
|
long |
VanillaBytesStoreHash.applyAsLong(@NotNull BytesStore<?,?> store)
Computes a 64-bit hash value for the given BytesStore.
|
long |
BytesStoreHash.applyAsLong(BytesStore<?,?> bytes,
long length)
Computes a 64-bit hash value of the given
BytesStore with a specified length. |
long |
OptimisedBytesStoreHash.applyAsLong(@NotNull BytesStore<?,?> store,
long remaining)
Hashes a BytesStore of the given length.
|
long |
XxHash.applyAsLong(BytesStore<?,?> bytes,
long length)
Computes a hash value for the given byte store with a specified length.
|
long |
VanillaBytesStoreHash.applyAsLong(BytesStore<?,?> bytes,
long length)
Computes a 64-bit hash value for the given BytesStore.
|
static long |
OptimisedBytesStoreHash.applyAsLong32bytesMultiple(@NotNull BytesStore<?,?> store,
int remaining)
Computes a 64-bit hash value for the given BytesStore for data sizes that are multiple of 32 bytes.
|
static long |
OptimisedBytesStoreHash.applyAsLongAny(@NotNull BytesStore<?,?> store,
long remaining)
Computes a 64-bit hash value for the given BytesStore for any size of data.
|
static long |
BytesStoreHash.hash(@NotNull BytesStore<?,?> b)
Computes a 64-bit hash value of the given
BytesStore. |
static long |
BytesStoreHash.hash(@NotNull BytesStore<?,?> b,
long length)
Computes a 64-bit hash value of the given
BytesStore with a specified length. |
static int |
BytesStoreHash.hash32(BytesStore<?,?> b)
Computes a 32-bit hash value of the given
BytesStore. |
static int |
BytesStoreHash.hash32(@NotNull BytesStore<?,?> b,
int length)
Computes a 32-bit hash value of the given
BytesStore with a specified length. |
| Modifier and Type | Class and Description |
|---|---|
class |
net.openhft.chronicle.bytes.internal.AbstractBytesStore<B extends BytesStore<B,U>,U>
An abstract base for
BytesStore
implementations. |
class |
net.openhft.chronicle.bytes.internal.NativeBytesStore<U>
A
BytesStore backed by off-heap native
memory. |
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable BytesStore |
AbstractReference.bytesStore
BytesStore associated with this reference
|
| Modifier and Type | Method and Description |
|---|---|
@NotNull BytesStore<?,?> |
UncheckedLongReference.bytesStore() |
@Nullable BytesStore<?,?> |
AbstractReference.bytesStore()
Returns the
BytesStore that backs this reference, or null if none is set. |
@Nullable BytesStore<?,?> |
BinaryIntArrayReference.bytesStore()
Retrieves the BytesStore.
|
@Nullable BytesStore<?,?> |
BinaryLongArrayReference.bytesStore() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
AbstractReference.acceptNewBytesStore(@NotNull BytesStore<?,?> bytes)
Updates the BytesStore for this reference, releasing any previous BytesStore
|
protected void |
BinaryIntArrayReference.acceptNewBytesStore(@NotNull BytesStore<?,?> bytes)
Assigns a new BytesStore to this BinaryIntArrayReference.
|
protected void |
BinaryLongArrayReference.acceptNewBytesStore(@NotNull BytesStore<?,?> bytes) |
void |
UncheckedLongReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Associates this
UncheckedLongReference with a BytesStore, specifying where the long value is stored and its length. |
void |
BinaryBooleanReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Sets the underlying BytesStore to work with, along with the offset and length.
|
void |
AbstractReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Sets the underlying
BytesStore together with the offset and length. |
void |
TextLongArrayReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length) |
void |
BinaryIntArrayReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Stores a bytes sequence into the BinaryIntArrayReference.
|
void |
BinaryIntReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Sets the BytesStore which this reference points to.
|
void |
BinaryLongReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Stores bytes from the given BytesStore into this BinaryLongReference.
|
void |
BinaryLongArrayReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length) |
void |
TextIntArrayReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length) |
void |
TextLongReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length)
Configures the byte store for this reference.
|
void |
TextIntReference.bytesStore(@NotNull BytesStore bytes,
long offset,
long length) |
static @NotNull LongReference |
UncheckedLongReference.create(@NotNull BytesStore<?,?> bytesStore,
long offset,
int size)
Factory method to create a
UncheckedLongReference or BinaryLongReference based on the JVM's debug status. |
static long |
TextLongArrayReference.peakLength(@NotNull BytesStore<?,?> bytes,
long offset)
Estimates the length of the text wire format structure for the long array
based on the current state of the given
BytesStore. |
static long |
BinaryIntArrayReference.peakLength(@NotNull BytesStore<?,?> bytes,
long offset)
Calculates and returns the peak length from the BytesStore at the given offset.
|
static long |
BinaryLongArrayReference.peakLength(@NotNull BytesStore<?,?> bytes,
long offset)
Returns the capacity from the BytesStore object and adding the fixed values size to get a length.
|
static long |
TextIntArrayReference.peakLength(@NotNull BytesStore<?,?> bytes,
long offset)
Determines the length of the array in the text format represented in the given
BytesStore. |
static long |
BinaryLongArrayReference.peakLength(@NotNull BytesStore<?,?> bytes,
long offset,
long capacityHint)
Returns the capacity from the BytesStore object, adding the fixed values size to get a length
If the read capacity is 0, the method writes the capacityHint at the offset and
updates the capacity with the capacityHint.
|
static void |
TextBooleanReference.write(boolean value,
BytesStore<?,?> bytes,
long offset)
Writes a boolean value to the specified
BytesStore at the given offset
in text wire format. |
| Modifier and Type | Method and Description |
|---|---|
protected @NotNull String |
Bit8StringInterner.getValue(@NotNull BytesStore<?,?> cs,
int length)
Decodes an 8-bit character sequence from the provided
BytesStore. |
protected abstract T |
AbstractInterner.getValue(BytesStore<?,?> bs,
int length)
Converts the bytes from
bs into an instance of T. |
protected @NotNull String |
UTF8StringInterner.getValue(@NotNull BytesStore<?,?> cs,
int length)
Decodes a UTF-8 string from the supplied
BytesStore. |
T |
AbstractInterner.intern(@NotNull BytesStore<?,?> cs)
Interns the specified BytesStore object.
|
T |
AbstractInterner.intern(@NotNull BytesStore<?,?> cs,
int length)
Interns the specified Bytes.
|
Copyright © 2026 Chronicle Software Ltd. All rights reserved.