|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.openbp.common.util.ByteArrayUtil
public final class ByteArrayUtil
Byte array manipulation methods.
| Method Summary | |
|---|---|
static byte |
fromHex(java.lang.String hex)
|
static byte[] |
fromShortHexString(java.lang.String hex)
|
static byte[] |
replaceBytes(byte[] bytes,
byte[] pattern,
byte[] replacement)
|
static byte[] |
toBytes(long lp)
Returns the byte array representation of the long. |
static java.lang.String |
toGroupedShortHexString(byte[] b)
Same as toShortHexString(), but after each 8 bytes, a space is inserted. |
static java.lang.String |
toHexString(byte b)
Returns a hexadecimal representation of the byte. |
static java.lang.String |
toHexString(byte[] b)
Returns a hexadecimal representation of the byte array. |
static java.lang.String |
toShortHexString(byte[] b)
Returns a short hexadecimal representation of the byte array. |
static java.lang.String |
toString(byte[] b)
Returns a String representation of the byte array formatted as in "[F1, 01, 10]". |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static byte[] replaceBytes(byte[] bytes,
byte[] pattern,
byte[] replacement)
public static java.lang.String toHexString(byte b)
b - Byte
public static java.lang.String toHexString(byte[] b)
b - Byte array
public static java.lang.String toString(byte[] b)
b - Byte array
public static java.lang.String toShortHexString(byte[] b)
public static byte[] fromShortHexString(java.lang.String hex)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static byte fromHex(java.lang.String hex)
throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentExceptionpublic static java.lang.String toGroupedShortHexString(byte[] b)
public static byte[] toBytes(long lp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||