Methods Summary |
---|
public abstract void | addElement(java.lang.String type, java.lang.String value)
|
public abstract void | addElement(java.lang.String type, int value)
|
public abstract void | addElement(java.lang.String type, boolean value)
|
public abstract void | closeHeadingElement(java.lang.String type)
|
public static java.lang.String | displayAsBinary(byte buffer)Use to display headers as their binary representation
//Convert buffer to hex representation
String hexValue = Integer.toHexString(buffer);
String char1 = "";
String char2 = "";
try
{
if (hexValue.length() == 8)
{
char1 = hexValue.substring(6, 7);
char2 = hexValue.substring(7, 8);
}
else if (hexValue.length() == 2)
{
char1 = hexValue.substring(0, 1);
char2 = hexValue.substring(1, 2);
}
else if (hexValue.length() == 1)
{
char1 = "0";
char2 = hexValue.substring(0, 1);
}
}
catch (StringIndexOutOfBoundsException se)
{
return "";
}
return hexBinaryMap.get(char1) + hexBinaryMap.get(char2);
|
public abstract void | openHeadingElement(java.lang.String type, java.lang.String value)
|
public abstract void | openHeadingElement(java.lang.String type, boolean value)
|
public abstract void | openHeadingElement(java.lang.String type, int value)
|
public abstract java.lang.String | toString()
|