public class ByteUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static int |
BOOLEAN_CHUNK_SIZE |
static int |
BYTE_CHUNK_SIZE |
static ByteCount |
DEFAULT_BUFFER_SIZE |
static java.nio.charset.Charset |
DEFAULT_CHARSET |
static int |
DEFAULT_STRING_BUFFER_SIZE |
static int |
DEFAULT_STRING_CHUNK_SIZE |
static int |
DOUBLE_CHUNK_SIZE |
static int |
FLOAT_CHUNK_SIZE |
static int |
INTEGER_CHUNK_SIZE |
static int |
LONG_CHUNK_SIZE |
static int |
SHORT_CHUNK_SIZE |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
allocateStringChunkFor(int bufferSize) |
static void |
checkBufferEnd(byte[] b,
int offset,
int length) |
static void |
checkOffset(int offset) |
static byte |
getByte(byte[] b,
int offset) |
static int |
getInteger(byte[] b,
int offset) |
static long |
getLong(byte[] b,
int offset) |
static short |
getShort(byte[] b,
int offset) |
static java.lang.String |
getString(byte[] b,
int bufferSize,
int offset,
java.nio.charset.Charset charset) |
static int |
getStringChunkSizeFor(int bufferSize) |
static int |
putByte(byte[] b,
int offset,
byte val) |
static int |
putInteger(byte[] b,
int offset,
int value) |
static int |
putLong(byte[] b,
int offset,
long value) |
static int |
putShort(byte[] b,
int offset,
short val) |
static int |
putString(byte[] b,
int bufferSize,
int offset,
java.lang.String value,
java.nio.charset.Charset charset) |
static int |
putZeros(byte[] b,
int offset,
int length) |
public static final java.nio.charset.Charset DEFAULT_CHARSET
public static final int BOOLEAN_CHUNK_SIZE
public static final int BYTE_CHUNK_SIZE
public static final int SHORT_CHUNK_SIZE
public static final int INTEGER_CHUNK_SIZE
public static final int LONG_CHUNK_SIZE
public static final int FLOAT_CHUNK_SIZE
public static final int DOUBLE_CHUNK_SIZE
public static final int DEFAULT_STRING_BUFFER_SIZE
public static final int DEFAULT_STRING_CHUNK_SIZE
public static final ByteCount DEFAULT_BUFFER_SIZE
@Nonnegative
public static int putByte(@Nonnull
byte[] b,
@Nonnegative
int offset,
byte val)
public static byte getByte(@Nonnull
byte[] b,
@Nonnegative
int offset)
@Nonnegative
public static int putShort(@Nonnull
byte[] b,
@Nonnegative
int offset,
short val)
public static short getShort(@Nonnull
byte[] b,
@Nonnegative
int offset)
@Nonnegative
public static int putInteger(@Nonnull
byte[] b,
@Nonnegative
int offset,
int value)
public static int getInteger(@Nonnull
byte[] b,
@Nonnegative
int offset)
@Nonnegative
public static int putLong(@Nonnull
byte[] b,
@Nonnegative
int offset,
long value)
public static long getLong(@Nonnull
byte[] b,
@Nonnegative
int offset)
@Nonnegative
public static int getStringChunkSizeFor(@Nonnegative
int bufferSize)
@Nonnegative
public static byte[] allocateStringChunkFor(@Nonnegative
int bufferSize)
@Nonnegative
public static int putString(@Nonnull
byte[] b,
@Nonnegative
int bufferSize,
@Nonnegative
int offset,
@Nullable
java.lang.String value,
@Nonnull
java.nio.charset.Charset charset)
@Nullable
public static java.lang.String getString(@Nonnull
byte[] b,
@Nonnegative
int bufferSize,
@Nonnegative
int offset,
@Nonnull
java.nio.charset.Charset charset)
@Nonnegative
public static int putZeros(@Nonnull
byte[] b,
@Nonnegative
int offset,
@Nonnegative
int length)
public static void checkBufferEnd(@Nonnull
byte[] b,
@Nonnegative
int offset,
@Nonnegative
int length)
public static void checkOffset(int offset)
Copyright © 2013 echocat. All Rights Reserved.