|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.red5.io.utils.HexDump
public class HexDump
Hexadecimal byte dumper
Constructor Summary | |
---|---|
HexDump()
|
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HexDump()
Method Detail |
---|
public static String prettyPrintHex(ByteBuffer bbToConvert)
bbToConvert
- ByteBuffer to encode
public static String prettyPrintHex(byte[] baToConvert)
baToConvert
- Array of bytes to encode
public static String prettyPrintHex(String sToConvert)
sToConvert
- string to convert
public 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 value
Exception
- 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 Parameter
public static String toBinaryString(byte[] ba)
ba
- binary array
public static String toBinaryString(byte b)
b
- byte array
public static String toBinaryString(short s)
s
- short
public static String toBinaryString(int i)
i
- integer
public static String toBinaryString(long l)
l
- long
public static final byte[] toByteArray(short s)
s
- short
public static final byte[] toByteArray(int i)
i
- int
public static final byte[] toByteArray(long l)
l
- long
public static String byteArrayToHexString(byte[] block)
block
- Description of Parameter
public static String stringToHexString(String in)
in
- string to be converted
public static String byteArrayToHexString(byte[] block, int offset, int length)
block
- Description of Parameteroffset
- Description of Parameterlength
- Description of Parameter
public static String toHexString(byte[] ba)
ba
- Description of Parameter
public static String toHexString(byte b)
b
- byte
public static String toHexString(short s)
s
- short
public static String toHexString(int i)
i
- int
public static String toHexString(long l)
l
- long
public static String toString(byte[] ba)
ba
- byte array
public static String toString(byte b)
b
- byte
public static String toHexString(byte[] ba, int offset, int length)
ba
- byte arrayoffset
- offset in arraylength
- number of bytes
public static byte[] hexStringToByteArray(String strA)
strA
- string
public static void main(String[] args)
args
- none neededpublic static String formatHexDump(String in)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |