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 |
copiedBuffer(String string,
Charset charset) |
static Slice |
copyOf(Slice slice) |
static Slice |
copyOf(Slice slice,
int offset,
int length) |
static String |
decodeString(ByteBuffer src,
Charset charset) |
static Slice |
ensureSize(Slice existingSlice,
int minWritableBytes) |
static Slice |
mapFileReadOnly(File file) |
static Slice |
utf8Slice(String string) |
static Slice |
wrappedBuffer(byte[] array) |
public static final Slice EMPTY_SLICE
0.public static Slice mapFileReadOnly(File file) throws IOException
IOExceptionpublic static Slice allocate(int capacity)
public static Slice wrappedBuffer(byte[] array)
public static String decodeString(ByteBuffer src, Charset charset)
Copyright © 2012-2014. All Rights Reserved.