public class StringUtils extends Object
toUtf8(String) and fromUtf8(byte[]).| Modifier and Type | Field and Description |
|---|---|
static byte[] |
EMPTY_BYTES |
static Charset |
UTF8_CHARSET
Deprecated.
|
static String |
UTF8_STRING |
| Constructor and Description |
|---|
StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static int |
estimatedBinaryLengthAsUTF8(String value) |
static String |
fromUtf8(byte[] bytes) |
static String |
fromUtf8(ByteBuffer buffer) |
static String |
fromUtf8(ByteBuffer buffer,
int numBytes) |
static String |
safeFormat(String message,
Object... formatArgs) |
static byte[] |
toUtf8(String string) |
static byte[] |
toUtf8WithNullToEmpty(String string) |
public static final byte[] EMPTY_BYTES
@Deprecated public static final Charset UTF8_CHARSET
public static final String UTF8_STRING
public static int estimatedBinaryLengthAsUTF8(String value)
public static byte[] toUtf8WithNullToEmpty(String string)
public static String fromUtf8(byte[] bytes)
public static String fromUtf8(ByteBuffer buffer, int numBytes)
public static String fromUtf8(ByteBuffer buffer)
public static byte[] toUtf8(String string)
Copyright © 2011–2017. All rights reserved.