public class HexDump extends Object
Constructor and Description |
---|
HexDump() |
Modifier and Type | Method and Description |
---|---|
static String |
byteArrayToBinaryString(byte[] block)
Description of the Method
|
static String |
byteArrayToHexString(byte[] block)
Description of the Method
|
static String |
byteArrayToHexString(byte[] block,
int offset,
int length)
Description of the Method
|
static void |
dumpHex(StringBuilder sb,
byte[] b)
Dumps a byte array as hex.
|
static String |
formatHexDump(String in) |
static byte[] |
hexStringToByteArray(String strA)
Converts readable hex-String to byteArray
|
static void |
main(String[] args)
test and demo for the Convert class
|
static String |
prettyPrintHex(byte[] baToConvert)
Method prettyPrintHex
|
static String |
prettyPrintHex(ByteBuffer bbToConvert)
Method prettyPrintHex
|
static String |
prettyPrintHex(String sToConvert)
Method prettyPrintHex
|
static void |
setBitDigits(char[] bd)
Sets the BitDigits attribute of the Convert class
|
static void |
setBitDigits(char zeroBit,
char oneBit)
Method setBitDigits
|
static void |
setByteSeparator(char bs)
Sets the ByteSeparator attribute of the Convert class
|
static void |
setWithByteSeparator(boolean bs)
Sets the WithByteSeparator attribute of the Convert class
|
static String |
stringToHexString(String in)
Description of the Method
|
static String |
toBinaryString(byte b)
Method toBinaryString
|
static String |
toBinaryString(byte[] ba)
Method toBinaryString
|
static String |
toBinaryString(int i)
Method toBinaryString
|
static String |
toBinaryString(long l)
Method toBinaryString
|
static String |
toBinaryString(short s)
Method toBinaryString
|
static byte[] |
toByteArray(int i)
Method toByteArray
|
static byte[] |
toByteArray(long l)
Method toByteArray
|
static byte[] |
toByteArray(short s)
Method toByteArray
|
static String |
toHexString(byte b)
Method toHexString
|
static String |
toHexString(byte[] ba)
Returns a string of hexadecimal digits from a byte array.
|
static String |
toHexString(byte[] ba,
int offset,
int length)
converts String to Hex String.
|
static String |
toHexString(int i)
Method toHexString
|
static String |
toHexString(long l)
Method toHexString
|
static String |
toHexString(short s)
Description of the Method
|
static String |
toString(byte b)
Method toString
|
static String |
toString(byte[] ba)
Method toString
|
public static String prettyPrintHex(ByteBuffer bbToConvert)
bbToConvert
- ByteBuffer to encodepublic static String prettyPrintHex(byte[] baToConvert)
baToConvert
- Array of bytes to encodepublic static String prettyPrintHex(String sToConvert)
sToConvert
- string to convertpublic static void dumpHex(StringBuilder sb, byte[] b)
sb
- b
- public static void setWithByteSeparator(boolean bs)
bs
- The new WithByteSeparator valuepublic static void setByteSeparator(char bs)
bs
- The new ByteSeparator valuepublic static void setBitDigits(char[] bd) throws Exception
bd
- The new BitDigits valueException
- Description of Exceptionpublic static void setBitDigits(char zeroBit, char oneBit)
zeroBit
- zero bitoneBit
- one bit
param redFish red fish
param blueFish blue fishpublic static String byteArrayToBinaryString(byte[] block)
block
- Description of Parameterpublic static String toBinaryString(byte[] ba)
ba
- binary arraypublic static String toBinaryString(byte b)
b
- byte arraypublic static String toBinaryString(short s)
s
- shortpublic static String toBinaryString(int i)
i
- integerpublic static String toBinaryString(long l)
l
- longpublic static final byte[] toByteArray(short s)
s
- shortpublic static final byte[] toByteArray(int i)
i
- intpublic static final byte[] toByteArray(long l)
l
- longpublic static String byteArrayToHexString(byte[] block)
block
- Description of Parameterpublic static String stringToHexString(String in)
in
- string to be convertedpublic static String byteArrayToHexString(byte[] block, int offset, int length)
block
- Description of Parameteroffset
- Description of Parameterlength
- Description of Parameterpublic static String toHexString(byte[] ba)
ba
- Description of Parameterpublic static String toHexString(byte b)
b
- bytepublic static String toHexString(short s)
s
- shortpublic static String toHexString(int i)
i
- intpublic static String toHexString(long l)
l
- longpublic static String toString(byte[] ba)
ba
- byte arraypublic static String toString(byte b)
b
- bytepublic static String toHexString(byte[] ba, int offset, int length)
ba
- byte arrayoffset
- offset in arraylength
- number of bytespublic static byte[] hexStringToByteArray(String strA)
strA
- stringpublic static void main(String[] args)
args
- none neededCopyright © 2006-2012 The Red5 Project