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 SlicecopiedBuffer(String string, Charset charset) static Slicestatic Slicestatic SliceensureSize(Slice existingSlice, int minWritableBytes) static Slicestatic 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 SlicewrappedHeapBuffer(ByteBuffer buffer)
-
Field Details
-
EMPTY_SLICE
A slice with size0.
-
-
Method Details
-
ensureSize
-
allocate
-
copyOf
-
copyOf
-
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
-
copiedBuffer
-
utf8Slice
-