Package io.airlift.slice
Class Slices
java.lang.Object
io.airlift.slice.Slices
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Sliceallocate(int capacity) static SliceallocateDirect(int capacity) Deprecated, for removal: This API element is subject to removal in a future version.static SlicecopiedBuffer(String string, Charset charset) static Slicestatic Slicestatic SliceensureSize(Slice existingSlice, int minWritableBytes) static SlicemapFileReadOnly(File file) Deprecated, for removal: This API element is subject to removal in a future version.static Slicestatic SlicewrappedBooleanArray(boolean... array) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedBooleanArray(boolean[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedBuffer(byte... array) Creates a slice over the specified array.static SlicewrappedBuffer(byte[] array, int offset, int length) Creates a slice over the specified array range.static SlicewrappedBuffer(ByteBuffer buffer) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedDoubleArray(double... array) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedDoubleArray(double[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedFloatArray(float... array) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedFloatArray(float[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedHeapBuffer(ByteBuffer buffer) static SlicewrappedIntArray(int... array) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedIntArray(int[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedLongArray(long... array) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedLongArray(long[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedShortArray(short... array) Deprecated, for removal: This API element is subject to removal in a future version.static SlicewrappedShortArray(short[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.
-
Field Details
-
EMPTY_SLICE
A slice with size0.
-
-
Method Details
-
ensureSize
-
allocate
-
allocateDirect
Deprecated, for removal: This API element is subject to removal in a future version. -
copyOf
-
copyOf
-
wrappedBuffer
Deprecated, for removal: This API element is subject to removal in a future version.Wrap the visible portion of aByteBuffer. -
wrappedHeapBuffer
-
wrappedBuffer
Creates a slice over the specified array. -
wrappedBuffer
Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
wrappedBooleanArray
Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array. -
wrappedBooleanArray
@Deprecated(forRemoval=true) public static Slice wrappedBooleanArray(boolean[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
wrappedShortArray
Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array. -
wrappedShortArray
@Deprecated(forRemoval=true) public static Slice wrappedShortArray(short[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
wrappedIntArray
Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array. -
wrappedIntArray
@Deprecated(forRemoval=true) public static Slice wrappedIntArray(int[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
wrappedLongArray
Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array. -
wrappedLongArray
@Deprecated(forRemoval=true) public static Slice wrappedLongArray(long[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
wrappedFloatArray
Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array. -
wrappedFloatArray
@Deprecated(forRemoval=true) public static Slice wrappedFloatArray(float[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
wrappedDoubleArray
Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array. -
wrappedDoubleArray
@Deprecated(forRemoval=true) public static Slice wrappedDoubleArray(double[] array, int offset, int length) Deprecated, for removal: This API element is subject to removal in a future version.Creates a slice over the specified array range.- Parameters:
offset- the array position at which the slice beginslength- the number of array positions to include in the slice
-
copiedBuffer
-
utf8Slice
-
mapFileReadOnly
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-