| Package | Description |
|---|---|
| io.airlift.slice | |
| io.airlift.slice.testing |
| Modifier and Type | Field and Description |
|---|---|
static Slice |
Slices.EMPTY_SLICE
A slice with size
0. |
| Modifier and Type | Method and Description |
|---|---|
static Slice |
Slices.allocate(int capacity) |
static Slice |
Slices.allocateDirect(int capacity) |
static Slice |
SliceUtf8.codePointToUtf8(int codePoint)
Convert the code point to UTF-8.
|
static Slice |
Slices.copiedBuffer(String string,
Charset charset) |
static Slice |
Slices.copyOf(Slice slice) |
static Slice |
Slices.copyOf(Slice slice,
int offset,
int length) |
Slice |
DynamicSliceOutput.copySlice() |
static Slice |
Slices.ensureSize(Slice existingSlice,
int minWritableBytes) |
static Slice |
SliceUtf8.fixInvalidUtf8(Slice slice) |
static Slice |
SliceUtf8.fixInvalidUtf8(Slice slice,
OptionalInt replacementCodePoint) |
Slice |
ChunkedSliceInput.BufferReference.getSlice() |
Slice |
DynamicSliceOutput.getUnderlyingSlice() |
Slice |
OutputStreamSliceOutput.getUnderlyingSlice() |
abstract Slice |
SliceOutput.getUnderlyingSlice()
Returns the raw underlying slice of this output stream.
|
Slice |
BasicSliceOutput.getUnderlyingSlice() |
static Slice |
Murmur3Hash128.hash(long seed,
Slice data,
int offset,
int length) |
static Slice |
Murmur3.hash(long seed,
Slice data,
int offset,
int length)
Deprecated.
|
static Slice |
Murmur3Hash128.hash(Slice data) |
static Slice |
Murmur3.hash(Slice data)
Deprecated.
|
static Slice |
Murmur3Hash128.hash(Slice data,
int offset,
int length) |
static Slice |
Murmur3.hash(Slice data,
int offset,
int length)
Deprecated.
|
static Slice |
SliceUtf8.leftTrim(Slice utf8)
Removes all white space characters from the left side of the string.
|
static Slice |
SliceUtf8.leftTrim(Slice utf8,
int[] whiteSpaceCodePoints)
Removes all
whiteSpaceCodePoints from the left side of the string. |
static Slice |
Slices.mapFileReadOnly(File file) |
Slice |
UnsafeSliceFactory.newSlice(long address,
int size)
Creates a slice for directly a raw memory address.
|
Slice |
UnsafeSliceFactory.newSlice(long address,
int size,
Object reference)
Creates a slice for directly a raw memory address.
|
Slice |
UnsafeSliceFactory.newSlice(Object base,
long address,
int size) |
abstract Slice |
SliceInput.readSlice(int length)
Returns a new slice of this buffer's sub-region starting at the current
position and increases the position by the size
of the new slice (= length). |
Slice |
InputStreamSliceInput.readSlice(int length) |
Slice |
ChunkedSliceInput.readSlice(int length) |
Slice |
BasicSliceInput.readSlice(int length) |
static Slice |
SliceUtf8.reverse(Slice utf8)
Reverses the slice code point by code point.
|
static Slice |
SliceUtf8.rightTrim(Slice utf8)
Removes all white space characters from the right side of the string.
|
static Slice |
SliceUtf8.rightTrim(Slice utf8,
int[] whiteSpaceCodePoints)
Removes all white
whiteSpaceCodePoints from the right side of the string. |
Slice |
DynamicSliceOutput.slice() |
Slice |
BasicSliceInput.slice()
Returns a slice of this buffer's readable bytes.
|
Slice |
OutputStreamSliceOutput.slice() |
abstract Slice |
SliceOutput.slice()
Returns a slice of this buffer's readable bytes.
|
Slice |
BasicSliceOutput.slice() |
Slice |
Slice.slice(int index,
int length)
Returns a slice of this buffer's sub-region.
|
static Slice |
SliceUtf8.substring(Slice utf8,
int codePointStart,
int codePointLength)
Gets the substring starting at
codePointStart and extending for
codePointLength code points. |
static Slice |
SliceUtf8.toLowerCase(Slice utf8)
Converts slice to lower case code point by code point.
|
static Slice |
Slice.toUnsafeSlice(ByteBuffer byteBuffer)
Deprecated.
|
static Slice |
SliceUtf8.toUpperCase(Slice utf8)
Converts slice to upper case code point by code point.
|
static Slice |
SliceUtf8.trim(Slice utf8)
Removes all white space characters from the left and right side of the string.
|
static Slice |
SliceUtf8.trim(Slice utf8,
int[] whiteSpaceCodePoints)
Removes all white
whiteSpaceCodePoints from the left and right side of the string. |
static Slice |
Slices.utf8Slice(String string) |
static Slice |
Slices.wrappedBooleanArray(boolean... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedBooleanArray(boolean[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
static Slice |
Slices.wrappedBuffer(byte... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedBuffer(byte[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
static Slice |
Slices.wrappedBuffer(ByteBuffer buffer)
Wrap the visible portion of a
ByteBuffer. |
static Slice |
Slices.wrappedDoubleArray(double... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedDoubleArray(double[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
static Slice |
Slices.wrappedFloatArray(float... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedFloatArray(float[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
static Slice |
Slices.wrappedIntArray(int... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedIntArray(int[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
static Slice |
Slices.wrappedLongArray(long... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedLongArray(long[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
static Slice |
Slices.wrappedShortArray(short... array)
Creates a slice over the specified array.
|
static Slice |
Slices.wrappedShortArray(short[] array,
int offset,
int length)
Creates a slice over the specified array range.
|
| Modifier and Type | Method and Description |
|---|---|
DynamicSliceOutput |
DynamicSliceOutput.appendBytes(Slice slice) |
SliceOutput |
OutputStreamSliceOutput.appendBytes(Slice slice) |
abstract SliceOutput |
SliceOutput.appendBytes(Slice slice) |
BasicSliceOutput |
BasicSliceOutput.appendBytes(Slice slice) |
int |
Slice.compareTo(int offset,
int length,
Slice that,
int otherOffset,
int otherLength)
Compares a portion of this slice with a portion of the specified slice.
|
int |
Slice.compareTo(Slice that)
Compares the content of the specified buffer to the content of this
buffer.
|
static int |
SliceUtf8.compareUtf16BE(Slice utf8Left,
Slice utf8Right)
Compares to UTF-8 sequences using UTF-16 big endian semantics.
|
static Slice |
Slices.copyOf(Slice slice) |
static Slice |
Slices.copyOf(Slice slice,
int offset,
int length) |
static int |
SliceUtf8.countCodePoints(Slice utf8)
Counts the code points within UTF-8 encoded slice.
|
static int |
SliceUtf8.countCodePoints(Slice utf8,
int offset,
int length)
Counts the code points within UTF-8 encoded slice up to
length. |
static Slice |
Slices.ensureSize(Slice existingSlice,
int minWritableBytes) |
boolean |
Slice.equals(int offset,
int length,
Slice that,
int otherOffset,
int otherLength)
Compares a portion of this slice with a portion of the specified slice.
|
static Slice |
SliceUtf8.fixInvalidUtf8(Slice slice) |
static Slice |
SliceUtf8.fixInvalidUtf8(Slice slice,
OptionalInt replacementCodePoint) |
void |
Slice.getBytes(int index,
Slice destination)
Transfers portion of data from this slice into the specified destination starting at
the specified absolute
index. |
void |
Slice.getBytes(int index,
Slice destination,
int destinationIndex,
int length)
Transfers portion of data from this slice into the specified destination starting at
the specified absolute
index. |
static byte |
UnsafeSlice.getByteUnchecked(Slice slice,
int index) |
static int |
SliceUtf8.getCodePointAt(Slice utf8,
int position)
Gets the UTF-8 encoded code point at the
position. |
static int |
SliceUtf8.getCodePointBefore(Slice utf8,
int position)
Gets the UTF-8 encoded code point before the
position. |
static int |
UnsafeSlice.getIntUnchecked(Slice slice,
int index) |
static long |
UnsafeSlice.getLongUnchecked(Slice slice,
int index) |
static short |
UnsafeSlice.getShortUnchecked(Slice slice,
int index) |
static int |
Murmur3Hash32.hash(int seed,
Slice data,
int offset,
int length) |
static long |
XxHash64.hash(long seed,
Slice data) |
static long |
XxHash64.hash(long seed,
Slice data,
int offset,
int length) |
static Slice |
Murmur3Hash128.hash(long seed,
Slice data,
int offset,
int length) |
static Slice |
Murmur3.hash(long seed,
Slice data,
int offset,
int length)
Deprecated.
|
static long |
XxHash64.hash(Slice data) |
static int |
Murmur3Hash32.hash(Slice data) |
static Slice |
Murmur3Hash128.hash(Slice data) |
static Slice |
Murmur3.hash(Slice data)
Deprecated.
|
static long |
XxHash64.hash(Slice data,
int offset,
int length) |
static int |
Murmur3Hash32.hash(Slice data,
int offset,
int length) |
static Slice |
Murmur3Hash128.hash(Slice data,
int offset,
int length) |
static Slice |
Murmur3.hash(Slice data,
int offset,
int length)
Deprecated.
|
static long |
Murmur3Hash128.hash64(long seed,
Slice data,
int offset,
int length) |
static long |
Murmur3.hash64(long seed,
Slice data,
int offset,
int length)
Deprecated.
|
static long |
Murmur3Hash128.hash64(Slice data)
Returns the 64 most significant bits of the Murmur128 hash of the provided value
|
static long |
Murmur3.hash64(Slice data)
Deprecated.
Returns the 64 most significant bits of the Murmur128 hash of the provided value
|
static long |
Murmur3Hash128.hash64(Slice data,
int offset,
int length) |
static long |
Murmur3.hash64(Slice data,
int offset,
int length)
Deprecated.
|
int |
Slice.indexOf(Slice slice)
Returns the index of the first occurrence of the pattern with this slice.
|
int |
Slice.indexOf(Slice pattern,
int offset)
Returns the index of the first occurrence of the pattern with this slice.
|
static boolean |
SliceUtf8.isAscii(Slice utf8)
Does the slice contain only 7-bit ASCII characters.
|
static Slice |
SliceUtf8.leftTrim(Slice utf8)
Removes all white space characters from the left side of the string.
|
static Slice |
SliceUtf8.leftTrim(Slice utf8,
int[] whiteSpaceCodePoints)
Removes all
whiteSpaceCodePoints from the left side of the string. |
static int |
SliceUtf8.lengthOfCodePoint(Slice utf8,
int position)
Gets the UTF-8 sequence length of the code point at
position. |
static int |
SliceUtf8.lengthOfCodePointSafe(Slice utf8,
int position)
Gets the UTF-8 sequence length of the code point at
position. |
static int |
SliceUtf8.offsetOfCodePoint(Slice utf8,
int codePointCount)
Finds the index of the first byte of the code point at a position, or
-1 if the position is not within the slice. |
static int |
SliceUtf8.offsetOfCodePoint(Slice utf8,
int position,
int codePointCount)
Starting from
position bytes in utf8, finds the
index of the first byte of the code point codePointCount
in the slice. |
void |
SliceInput.readBytes(Slice destination)
Transfers this buffer's data to the specified destination starting at
the current
position until the destination becomes
non-writable, and increases the position by the number of the
transferred bytes. |
void |
SliceInput.readBytes(Slice destination,
int length)
Transfers this buffer's data to the specified destination starting at
the current
position and increases the position
by the number of the transferred bytes (= length). |
abstract void |
SliceInput.readBytes(Slice destination,
int destinationIndex,
int length)
Transfers this buffer's data to the specified destination starting at
the current
position and increases the position
by the number of the transferred bytes (= length). |
void |
InputStreamSliceInput.readBytes(Slice destination,
int destinationIndex,
int length) |
void |
ChunkedSliceInput.readBytes(Slice destination,
int destinationIndex,
int length) |
void |
BasicSliceInput.readBytes(Slice destination,
int destinationIndex,
int length) |
static Slice |
SliceUtf8.reverse(Slice utf8)
Reverses the slice code point by code point.
|
static Slice |
SliceUtf8.rightTrim(Slice utf8)
Removes all white space characters from the right side of the string.
|
static Slice |
SliceUtf8.rightTrim(Slice utf8,
int[] whiteSpaceCodePoints)
Removes all white
whiteSpaceCodePoints from the right side of the string. |
void |
Slice.setBytes(int index,
Slice source)
Transfers data from the specified slice into this buffer starting at
the specified absolute
index. |
void |
Slice.setBytes(int index,
Slice source,
int sourceIndex,
int length)
Transfers data from the specified slice into this buffer starting at
the specified absolute
index. |
static int |
SliceUtf8.setCodePointAt(int codePoint,
Slice utf8,
int position)
Sets the UTF-8 sequence for code point at the
position. |
static Slice |
SliceUtf8.substring(Slice utf8,
int codePointStart,
int codePointLength)
Gets the substring starting at
codePointStart and extending for
codePointLength code points. |
static Slice |
SliceUtf8.toLowerCase(Slice utf8)
Converts slice to lower case code point by code point.
|
static Slice |
SliceUtf8.toUpperCase(Slice utf8)
Converts slice to upper case code point by code point.
|
static Slice |
SliceUtf8.trim(Slice utf8)
Removes all white space characters from the left and right side of the string.
|
static Slice |
SliceUtf8.trim(Slice utf8,
int[] whiteSpaceCodePoints)
Removes all white
whiteSpaceCodePoints from the left and right side of the string. |
static int |
SliceUtf8.tryGetCodePointAt(Slice utf8,
int position)
Tries to get the UTF-8 encoded code point at the
position. |
XxHash64 |
XxHash64.update(Slice data) |
XxHash64 |
XxHash64.update(Slice data,
int offset,
int length) |
void |
DynamicSliceOutput.writeBytes(Slice source) |
void |
OutputStreamSliceOutput.writeBytes(Slice source) |
abstract void |
SliceOutput.writeBytes(Slice source)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex until the source buffer becomes
unreadable, and increases the writerIndex by the number of
the transferred bytes. |
void |
BasicSliceOutput.writeBytes(Slice source) |
void |
DynamicSliceOutput.writeBytes(Slice source,
int sourceIndex,
int length) |
void |
OutputStreamSliceOutput.writeBytes(Slice source,
int sourceIndex,
int length) |
abstract void |
SliceOutput.writeBytes(Slice source,
int sourceIndex,
int length)
Transfers the specified source buffer's data to this buffer starting at
the current
writerIndex and increases the writerIndex
by the number of the transferred bytes (= length). |
void |
BasicSliceOutput.writeBytes(Slice source,
int sourceIndex,
int length) |
| Constructor and Description |
|---|
BasicSliceInput(Slice slice) |
BasicSliceOutput(Slice slice) |
| Modifier and Type | Method and Description |
|---|---|
static void |
SliceAssertions.assertSlicesEqual(Slice actual,
Slice expected) |
Copyright © 2012–2018. All rights reserved.