public final class Slices extends Object
Modifier and Type | Field and Description |
---|---|
static Slice |
EMPTY_SLICE
A slice with size
0 . |
Modifier and Type | Method and Description |
---|---|
static Slice |
allocate(int capacity) |
static Slice |
allocateDirect(int capacity) |
static Slice |
copiedBuffer(String string,
Charset charset) |
static Slice |
copyOf(Slice slice) |
static Slice |
copyOf(Slice slice,
int offset,
int length) |
static Slice |
ensureSize(Slice existingSlice,
int minWritableBytes) |
static Slice |
mapFileReadOnly(File file) |
static Slice |
utf8Slice(String string) |
static Slice |
wrappedBooleanArray(boolean... array) |
static Slice |
wrappedBooleanArray(boolean[] array,
int offset,
int length) |
static Slice |
wrappedBuffer(byte[] array) |
static Slice |
wrappedBuffer(byte[] array,
int offset,
int length) |
static Slice |
wrappedBuffer(ByteBuffer buffer)
Wrap the visible portion of a
ByteBuffer . |
static Slice |
wrappedDoubleArray(double... array) |
static Slice |
wrappedDoubleArray(double[] array,
int offset,
int length) |
static Slice |
wrappedFloatArray(float... array) |
static Slice |
wrappedFloatArray(float[] array,
int offset,
int length) |
static Slice |
wrappedIntArray(int... array) |
static Slice |
wrappedIntArray(int[] array,
int offset,
int length) |
static Slice |
wrappedLongArray(long... array) |
static Slice |
wrappedLongArray(long[] array,
int offset,
int length) |
static Slice |
wrappedShortArray(short... array) |
static Slice |
wrappedShortArray(short[] array,
int offset,
int length) |
public static final Slice EMPTY_SLICE
0
.public static Slice allocate(int capacity)
public static Slice allocateDirect(int capacity)
public static Slice wrappedBuffer(ByteBuffer buffer)
ByteBuffer
.public static Slice wrappedBuffer(byte[] array)
public static Slice wrappedBuffer(byte[] array, int offset, int length)
public static Slice wrappedBooleanArray(boolean... array)
public static Slice wrappedBooleanArray(boolean[] array, int offset, int length)
public static Slice wrappedShortArray(short... array)
public static Slice wrappedShortArray(short[] array, int offset, int length)
public static Slice wrappedIntArray(int... array)
public static Slice wrappedIntArray(int[] array, int offset, int length)
public static Slice wrappedLongArray(long... array)
public static Slice wrappedLongArray(long[] array, int offset, int length)
public static Slice wrappedFloatArray(float... array)
public static Slice wrappedFloatArray(float[] array, int offset, int length)
public static Slice wrappedDoubleArray(double... array)
public static Slice wrappedDoubleArray(double[] array, int offset, int length)
public static Slice mapFileReadOnly(File file) throws IOException
IOException
Copyright © 2012-2015. All Rights Reserved.