public class Bit8StringInterner extends AbstractInterner<String>
AbstractInterner for interning String
objects whose bytes are assumed to represent 8-bit characters such as
ISO-8859-1.
Example usage:
Bit8StringInterner interner = new Bit8StringInterner(128);
String s = interner.intern(bytes, length);
AbstractInternerentries, mask, shift, toggle| Constructor and Description |
|---|
Bit8StringInterner(int capacity)
Constructs a new Bit8StringInterner with the specified capacity.
|
| Modifier and Type | Method and Description |
|---|---|
protected @NotNull String |
getValue(@NotNull BytesStore<?,?> cs,
int length)
Decodes an 8-bit character sequence from the provided
BytesStore. |
intern, intern, intern, intern, toggle, valueCountpublic Bit8StringInterner(int capacity)
capacity - the initial capacity for the interner@NotNull protected @NotNull String getValue(@NotNull @NotNull BytesStore<?,?> cs, int length) throws IllegalStateException, BufferUnderflowException
BytesStore.
Exactly length bytes are read starting from cs.readPosition().
The read position is not modified.getValue in class AbstractInterner<String>cs - the bytes store containing the characterslength - the number of bytes to readBufferUnderflowException - If the BytesStore doesn't have enough remaining capacitynet.openhft.chronicle.core.io.ClosedIllegalStateException - If the resource has been released or closed.net.openhft.chronicle.core.io.ThreadingIllegalStateException - If this resource was accessed by multiple threads in an unsafe wayIllegalStateExceptionCopyright © 2026 Chronicle Software Ltd. All rights reserved.