openjava.tools
Class DebugOut

java.lang.Object
  |
  +--openjava.tools.DebugOut

public final class DebugOut
extends Object

The DebugOut class is used to print something in debugging. No instance should be allocate and this class should be used statically.

This class implements most methods of public printing methods found in java.io.PrintWriter, as static methods.

Since:
JDK1.1
Version:
1.0a1, 98/04/10
Author:
Michiaki Tatsubori
See Also:
NonLeaf

Field Summary
private static int debugLevel
           
protected static PrintStream out
          for debug
 
Constructor Summary
DebugOut()
           
 
Method Summary
static boolean checkError()
          Flush the stream and check its error state.
static void close()
          Close the stream.
static void flush()
          Flush the stream.
static int getDebugLevel()
           
static PrintStream getStream()
          Returns the output stream.
static void print(boolean b)
          Print a boolean.
static void print(char c)
          Print a character.
static void print(char[] s)
          Print an array of chracters.
static void print(double d)
          Print a double.
static void print(float f)
          Print a float.
static void print(int i)
          Print an integer.
static void print(long l)
          Print a long.
static void print(Object obj)
          Print an object.
static void print(String s)
          Print a String.
static void println()
          Finish the line.
static void println(boolean x)
          Print a boolean, and then finish the line.
static void println(char x)
          Print a character, and then finish the line.
static void println(char[] x)
          Print an array of characters, and then finish the line.
static void println(double x)
          Print a double, and then finish the line.
static void println(float x)
          Print a float, and then finish the line.
static void println(int x)
          Print an integer, and then finish the line.
static void println(long x)
          Print a long, and then finish the line.
static void println(Object x)
          Print an Object, and then finish the line.
static void println(String x)
          Print a String, and then finish the line.
static void setDebugLevel(int level)
           
static void setDebugOut(PrintStream ps)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugLevel

private static int debugLevel

out

protected static PrintStream out
for debug

Constructor Detail

DebugOut

public DebugOut()
Method Detail

setDebugLevel

public static void setDebugLevel(int level)

getDebugLevel

public static int getDebugLevel()

setDebugOut

public static void setDebugOut(PrintStream ps)

getStream

public static PrintStream getStream()
Returns the output stream. You can use this stream to print regardless of the value of debugLevel (perhaps based upon other, more specific, properties).


flush

public static void flush()
Flush the stream.


close

public static void close()
Close the stream.


checkError

public static boolean checkError()
Flush the stream and check its error state. Errors are cumulative; once the stream encounters an error, this routine will return true on all successive calls.

Returns:
True if the print stream has encountered an error, either on the underlying output stream or during a format conversion.

print

public static void print(boolean b)
Print a boolean.


print

public static void print(char c)
Print a character.


print

public static void print(int i)
Print an integer.


print

public static void print(long l)
Print a long.


print

public static void print(float f)
Print a float.


print

public static void print(double d)
Print a double.


print

public static void print(char[] s)
Print an array of chracters.


print

public static void print(String s)
Print a String.


print

public static void print(Object obj)
Print an object.


println

public static void println()
Finish the line.


println

public static void println(boolean x)
Print a boolean, and then finish the line.


println

public static void println(char x)
Print a character, and then finish the line.


println

public static void println(int x)
Print an integer, and then finish the line.


println

public static void println(long x)
Print a long, and then finish the line.


println

public static void println(float x)
Print a float, and then finish the line.


println

public static void println(double x)
Print a double, and then finish the line.


println

public static void println(char[] x)
Print an array of characters, and then finish the line.


println

public static void println(String x)
Print a String, and then finish the line.


println

public static void println(Object x)
Print an Object, and then finish the line.


SourceForge.net_Logo