public class BytesValueUtils
extends java.lang.Object
Constructor and Description |
---|
BytesValueUtils() |
Modifier and Type | Method and Description |
---|---|
static byte[] |
append(byte[] target,
byte prefix)
Append a prefix to the given
target . |
static BytesValue |
append(BytesValue target,
byte prefix)
Append a prefix to the given
target . |
static byte[] |
trimPrefix(byte[] source)
Trim prefix of the
target . |
static BytesValue |
trimPrefix(BytesValue target)
Trim prefix of the
target . |
static void |
validatePrefix(byte[] target,
byte prefix)
Validate a prefix of the target.
|
static void |
validatePrefix(BytesValue target,
byte prefix)
Validate a prefix of the target.
|
public static void validatePrefix(BytesValue target, byte prefix)
target
- byte array to validateprefix
- a prefixpublic static void validatePrefix(byte[] target, byte prefix)
target
- byte array to validateprefix
- a prefixpublic static BytesValue append(BytesValue target, byte prefix)
target
.target
- a targetprefix
- a prefix to appendpublic static byte[] append(byte[] target, byte prefix)
target
.target
- a targetprefix
- a prefix to appendpublic static BytesValue trimPrefix(BytesValue target)
target
- a byte arraypublic static byte[] trimPrefix(byte[] source)
target
. Return empty byte array if source
is null or empty.source
- a byte array