com.wowza.util
Class DebugUtils

Object
  extended by com.wowza.util.DebugUtils

public final class DebugUtils
extends Object

DebugUtils: Debugging utilties.


Constructor Summary
DebugUtils()
           
 
Method Summary
static String formatBytes(byte[] data)
          Format byte array for printing.
static String formatBytes(byte[] data, int offset, int len)
          Format byte array for printing.
static String formatBytesShort(byte[] data)
          Format byte array for printing.
static String formatBytesShort(byte[] data, int offset, int len)
          Format byte array for printing.
static String formatBytesStruct(byte[] data)
           
static String formatBytesStruct(byte[] data, int offset, int len)
          Format byte array for printing.
static String toHex(byte value)
          Format a byte value to a 0xff format
static String toHex(int value)
          Format a byte value to a 0xffffffff format
static String toLong(long value)
          Format a long value to a 0xffffffffffffffff format
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugUtils

public DebugUtils()
Method Detail

formatBytes

public static String formatBytes(byte[] data)
Format byte array for printing. Format as rows of hex values (16 values per row) along with text representation of data.

Parameters:
data - byte array
Returns:
formatted string

formatBytes

public static String formatBytes(byte[] data,
                                 int offset,
                                 int len)
Format byte array for printing. Format as rows of hex values (16 values per row) along with text representation of data.

Parameters:
data - byte array
offset - start index in array
len - length to format
Returns:
formatted string

formatBytesShort

public static String formatBytesShort(byte[] data)
Format byte array for printing. Simple format as rows of hex values (16 values per row)

Parameters:
data - byte array
Returns:
formatted string

formatBytesShort

public static String formatBytesShort(byte[] data,
                                      int offset,
                                      int len)
Format byte array for printing. Simple format as rows of hex values (16 values per row)

Parameters:
data - byte array
offset - offset in array
len - data len
Returns:
formatted string

formatBytesStruct

public static String formatBytesStruct(byte[] data)

formatBytesStruct

public static String formatBytesStruct(byte[] data,
                                       int offset,
                                       int len)
Format byte array for printing. Format as Java primitive byte values (8 per row).

Parameters:
data - byte array
Returns:
formatted string

toHex

public static String toHex(byte value)
Format a byte value to a 0xff format

Parameters:
value - byte value
Returns:
return string

toHex

public static String toHex(int value)
Format a byte value to a 0xffffffff format

Parameters:
value - int value
Returns:
return string

toLong

public static String toLong(long value)
Format a long value to a 0xffffffffffffffff format

Parameters:
value - long value
Returns:
return string