public class StringUtil
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected static byte[] |
hexValTable |
| Constructor and Description |
|---|
StringUtil() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
hexToByte(java.lang.String s) |
static boolean |
isNullorEmpty(java.lang.String aStr) |
static byte[] |
toByteArray(java.lang.String s)
Convert string to byte array
|
static java.lang.String |
toHexString(byte[] ba) |
static java.lang.String |
toHexString(byte[] ba,
int offset,
int length) |
static java.lang.String |
toString(byte[] ba)
Returns a string of hexadecimal digits from a byte array.
|
static java.lang.String |
toString(byte[] ba,
int offset,
int length)
Returns a string of hexadecimal digits from a byte array, starting at
offset and consisting of length bytes. |
public static java.lang.String toString(byte[] ba)
Returns a string of hexadecimal digits from a byte array. Each byte is converted to 2 hex symbols; zero(es) included.
This method calls the method with same name and three arguments as:
toString(ba, 0, ba.length);
ba - the byte array to convert.public static final java.lang.String toString(byte[] ba,
int offset,
int length)
Returns a string of hexadecimal digits from a byte array, starting at
offset and consisting of length bytes. Each byte
is converted to 2 hex symbols; zero(es) included.
ba - the byte array to convert.offset - the index from which to start considering the bytes to
convert.length - the count of bytes, starting from the designated offset to
convert.public static final java.lang.String toHexString(byte[] ba,
int offset,
int length)
public static final java.lang.String toHexString(byte[] ba)
public static final byte[] hexToByte(java.lang.String s)
public static final byte[] toByteArray(java.lang.String s)
s - public static boolean isNullorEmpty(java.lang.String aStr)
Copyright © 2025. All rights reserved.