org.mbari.siam.utils
Class PrintUtils

java.lang.Object
  extended by org.mbari.siam.utils.PrintUtils

public class PrintUtils
extends java.lang.Object

Print utility class to provide formatted output such as binary hex dumps ( a la MSDOS debug ). For ease of use this class has been designed as a singleton w/ a static public interface.

Version:
1.0
Author:
Martyn Griffiths

Method Summary
static java.lang.String getAscii(byte[] buf, int offset, int count)
          Return String representation of bytes in input buffer.
static int printAscii(byte[] buf, int offset, int count)
          Print String representation of bytes in input buffer to stdout.
static void printFull(byte[] buf, int offset, int count)
           
static void setWidth(int width)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

setWidth

public static void setWidth(int width)

getAscii

public static java.lang.String getAscii(byte[] buf,
                                        int offset,
                                        int count)
                                 throws java.lang.IllegalArgumentException
Return String representation of bytes in input buffer.

Throws:
java.lang.IllegalArgumentException

printAscii

public static int printAscii(byte[] buf,
                             int offset,
                             int count)
                      throws java.lang.IllegalArgumentException
Print String representation of bytes in input buffer to stdout.

Throws:
java.lang.IllegalArgumentException

printFull

public static void printFull(byte[] buf,
                             int offset,
                             int count)
                      throws java.lang.IllegalArgumentException
Parameters:
buf -
offset -
count -
Throws:
java.lang.IllegalArgumentException


Copyright © 2003 MBARI.

The Monterey Bay Aquarium Research Institute (MBARI) provides this documentation and code "as is", with no warranty, express or implied, of its quality or consistency. It is provided without support and without obligation on the part of MBARI to assist in its use, correction, modification, or enhancement.