public final class ByteUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Charset |
DEFAULT_CHARSET |
static String |
DEFAULT_CHARSET_NAME |
static boolean |
ENABLE_FAST_STRING_ENCODER |
static org.slf4j.Logger |
log |
static ByteBuffer |
SPLIT |
static boolean |
testing
if it is testing,check key argument even if use binary protocol.
|
Modifier and Type | Method and Description |
---|---|
static void |
byte2hex(byte b,
StringBuffer buf) |
static void |
checkKey(byte[] keyBytes) |
static void |
checkKey(String key) |
static void |
getBytes(long i,
int index,
byte[] buf) |
static byte[] |
getBytes(String k) |
static String |
getString(byte[] bytes) |
static byte |
int0(int x) |
static byte |
int1(int x) |
static byte |
int2(int x) |
static void |
int2hex(int a,
StringBuffer str) |
static byte |
int3(int x) |
static boolean |
isNumber(String string) |
static boolean |
isValidString(String s) |
static byte |
long0(long x) |
static byte |
long1(long x) |
static byte |
long2(long x) |
static byte |
long3(long x) |
static byte |
long4(long x) |
static byte |
long5(long x) |
static byte |
long6(long x) |
static byte |
long7(long x) |
static String |
nextLine(ByteBuffer buffer)
Read next line from ByteBuffer
|
static int |
normalizeCapacity(int requestedCapacity) |
static int |
setArguments(byte[] bb,
int index,
Object... args) |
static void |
setArguments(IoBuffer bb,
Object... args) |
static void |
setProtocol(Protocol protocol) |
static byte |
short0(short x) |
static byte |
short1(short x) |
static void |
short2hex(int a,
StringBuffer str) |
static boolean |
stepBuffer(ByteBuffer buffer,
int remaining) |
static int |
stringSize(int x) |
static int |
stringSize(long x) |
public static final org.slf4j.Logger log
public static final String DEFAULT_CHARSET_NAME
public static final Charset DEFAULT_CHARSET
public static final ByteBuffer SPLIT
public static final boolean ENABLE_FAST_STRING_ENCODER
public static boolean testing
public static boolean isValidString(String s)
public static boolean isNumber(String string)
public static final byte[] getBytes(String k)
public static final int setArguments(byte[] bb, int index, Object... args)
public static final void checkKey(byte[] keyBytes)
public static final void checkKey(String key)
public static void setProtocol(Protocol protocol)
public static final int normalizeCapacity(int requestedCapacity)
public static final boolean stepBuffer(ByteBuffer buffer, int remaining)
public static final String nextLine(ByteBuffer buffer)
buffer
- public static String getString(byte[] bytes)
public static void byte2hex(byte b, StringBuffer buf)
public static void int2hex(int a, StringBuffer str)
public static void short2hex(int a, StringBuffer str)
public static void getBytes(long i, int index, byte[] buf)
public static final int stringSize(int x)
public static final int stringSize(long x)
public static byte int3(int x)
public static byte int2(int x)
public static byte int1(int x)
public static byte int0(int x)
public static byte short1(short x)
public static byte short0(short x)
public static byte long7(long x)
public static byte long6(long x)
public static byte long5(long x)
public static byte long4(long x)
public static byte long3(long x)
public static byte long2(long x)
public static byte long1(long x)
public static byte long0(long x)
Copyright © 2021. All rights reserved.