public final class Asn1StringUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static byte[] |
EMPTY_BYTES
The empty byte[]
|
private static byte[] |
HEX_CHAR
Hex chars
|
| Modifier | Constructor and Description |
|---|---|
private |
Asn1StringUtils() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
asciiStringToByte(java.lang.String string)
Transform a string to an array of ASCII bytes, where the byte array will contain
only values in [0, 127].
|
static java.lang.String |
dumpByte(byte octet)
Helper function that dump a byte in hex form
|
static java.lang.String |
dumpBytes(byte[] buffer)
Helper function that dump an array of bytes in hex form
|
static byte[] |
getBytesUtf8(java.lang.String string)
Return UTF-8 encoded byte[] representation of a String
|
private static final byte[] HEX_CHAR
public static final byte[] EMPTY_BYTES
public static java.lang.String dumpByte(byte octet)
octet - The byte to dumppublic static java.lang.String dumpBytes(byte[] buffer)
buffer - The bytes array to dumppublic static byte[] getBytesUtf8(java.lang.String string)
string - The string to be transformed to a byte arraypublic static byte[] asciiStringToByte(java.lang.String string)
string - The byte array to transform