public final class UTF8Utils
extends java.lang.Object
| Modifier | Constructor and Description |
|---|---|
private |
UTF8Utils()
Creates a new instance of UTF8Utils.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
getByteSize(java.lang.String value)
Calculates the size of the string in bytes.
|
static java.lang.String |
truncate(java.lang.String value,
Truncates string value from the right so that its length in bytes does not exceed
specified maximum (of bytes).
|
value - Value to be truncated.maxBytes - Maximum of bytes that the result value must not exceed.value - String value.