com.eyebolt.util
Class Trace

java.lang.Object
  |
  +--com.eyebolt.util.Trace

public class Trace
extends java.lang.Object

Trace utility methods

Version:
$Revision: 1.4 $
Author:
John Gardner

Field Summary
private static boolean verbose
          Global debug flag
 
Constructor Summary
Trace()
           
 
Method Summary
static boolean getVerbose()
          Allow user to change debug state.
static void setVerbose(boolean verbose)
          Allow user to change debug state.
static void showBytes(java.io.PrintStream out, byte[] buf)
           
static void showBytes(java.io.PrintStream out, byte[] buf, int offset)
           
static void showBytes(java.io.PrintStream out, byte[] buf, int offset, int count)
           
static long since(long startTime, java.lang.String message)
          Calculate a time delta since a timestamp
static long timestamp(java.lang.String message)
          Print a timestamp and return it
static void trace(java.lang.Exception e)
          Write a trace message for an exception
static void trace(java.lang.String s)
          Write a trace message to standard output stream.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

verbose

private static boolean verbose
Global debug flag
Constructor Detail

Trace

public Trace()
Method Detail

setVerbose

public static void setVerbose(boolean verbose)
Allow user to change debug state.

getVerbose

public static boolean getVerbose()
Allow user to change debug state.

trace

public static final void trace(java.lang.String s)
Write a trace message to standard output stream.
Parameters:
s - string to write

trace

public static final void trace(java.lang.Exception e)
Write a trace message for an exception
Parameters:
exception - exception to trace

timestamp

public static final long timestamp(java.lang.String message)
Print a timestamp and return it
Parameters:
message - string to prepend to timestamp

since

public static final long since(long startTime,
                               java.lang.String message)
Calculate a time delta since a timestamp
Parameters:
message - string to prepend to timestamp

showBytes

public static void showBytes(java.io.PrintStream out,
                             byte[] buf)

showBytes

public static void showBytes(java.io.PrintStream out,
                             byte[] buf,
                             int offset)

showBytes

public static void showBytes(java.io.PrintStream out,
                             byte[] buf,
                             int offset,
                             int count)


Copyright © 2001 Eyebolt, Inc.