com.plumtree.openfoundation.util
Class XPSystem.Error

java.lang.Object
  extended bycom.plumtree.openfoundation.util.XPSystem.Error
Enclosing class:
XPSystem

public static class XPSystem.Error
extends java.lang.Object

The "standard" error output stream. This stream is already open and ready to accept output data.

Typically this stream corresponds to display output or another output destination specified by the host environment or user. By convention, this output stream is used to display error messages or other information that should come to the immediate attention of a user even if the principal output stream, the value of the variable out, has been redirected to a file or other destination that is typically not continuously monitored.


Constructor Summary
XPSystem.Error()
           
 
Method Summary
static void Flush()
          Flush the stream.
static XPWriter GetWriter()
          GetWriter() exposes System.err as a wrapper around Writer to match the .NET platform, which provides Console.Error as a TextWriter.
static void Write(boolean b)
          Print a boolean value.
static void Write(char c)
          Print a character.
static void Write(char[] c)
          Print an array of characters.
static void Write(double d)
          Print a double-precision floating-point number.
static void Write(float f)
          Print a floating-point number.
static void Write(int i)
          Print an integer.
static void Write(long l)
          Print a long integer.
static void Write(java.lang.Object obj)
          Print an object.
static void Write(java.lang.String s)
          Print a string.
static void WriteLine(boolean b)
          Print a boolean and then terminate the line.
static void WriteLine(char c)
          Print a character and then terminate the line.
static void WriteLine(char[] c)
          Print an array of characters and then terminate the line.
static void WriteLine(double d)
          Print a double and then terminate the line.
static void WriteLine(float f)
          Print a float and then terminate the line.
static void WriteLine(int i)
          Print an integer and then terminate the line.
static void WriteLine(long l)
          Print an integer and then terminate the line.
static void WriteLine(java.lang.Object obj)
          Print an Object and then terminate the line.
static void WriteLine(java.lang.String s)
          Print a String and then terminate the line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPSystem.Error

public XPSystem.Error()
Method Detail

Write

public static void Write(boolean b)
Print a boolean value. The string produced by String.valueOf(boolean) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
b - The boolean to be printed

Write

public static void Write(char c)
Print a character. The character is translated into one or more bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
c - The char to be printed

Write

public static void Write(char[] c)
Print an array of characters. The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
c - The array of chars to be printed
Throws:
java.lang.NullPointerException - If s is null

Write

public static void Write(double d)
Print a double-precision floating-point number. The string produced by String.valueOf(double) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
d - The double to be printed
See Also:
Double.toString(double)

Write

public static void Write(float f)
Print a floating-point number. The string produced by String.valueOf(float) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
f - The float to be printed
See Also:
Float.toString(float)

Write

public static void Write(int i)
Print an integer. The string produced by String.valueOf(int) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
i - The int to be printed
See Also:
Integer.toString(int)

Write

public static void Write(long l)
Print a long integer. The string produced by String.valueOf(long) is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
l - The long to be printed
See Also:
Long.toString(long)

Write

public static void Write(java.lang.Object obj)
Print an object. The string produced by the String.valueOf(Object) method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
obj - The Object to be printed
See Also:
Object.toString()

Write

public static void Write(java.lang.String s)
Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the #write(int) method.

Parameters:
s - The String to be printed

WriteLine

public static void WriteLine(boolean b)
Print a boolean and then terminate the line. This method behaves as though it invokes #print(boolean) and then #println().

Parameters:
b - The boolean to be printed

WriteLine

public static void WriteLine(char c)
Print a character and then terminate the line. This method behaves as though it invokes #print(char) and then #println().

Parameters:
c - The char to be printed.

WriteLine

public static void WriteLine(char[] c)
Print an array of characters and then terminate the line. This method behaves as though it invokes #print(char[]) and then #println().

Parameters:
c - an array of chars to print.

WriteLine

public static void WriteLine(double d)
Print a double and then terminate the line. This method behaves as though it invokes #print(double) and then #println().

Parameters:
d - The double to be printed.

WriteLine

public static void WriteLine(float f)
Print a float and then terminate the line. This method behaves as though it invokes #print(float) and then #println().

Parameters:
f - The float to be printed.

WriteLine

public static void WriteLine(int i)
Print an integer and then terminate the line. This method behaves as though it invokes #print(int) and then #println().

Parameters:
i - The int to be printed.

WriteLine

public static void WriteLine(long l)
Print an integer and then terminate the line. This method behaves as though it invokes #print(int) and then #println().

Parameters:
l - The int to be printed.

WriteLine

public static void WriteLine(java.lang.Object obj)
Print an Object and then terminate the line. This method behaves as though it invokes #print(Object) and then #println().

Parameters:
obj - The Object to be printed.

WriteLine

public static void WriteLine(java.lang.String s)
Print a String and then terminate the line. This method behaves as though it invokes #print(String) and then #println().

Parameters:
s - The String to be printed.

Flush

public static void Flush()
Flush the stream. This is done by writing any buffered output bytes to the underlying output stream and then flushing that stream.


GetWriter

public static XPWriter GetWriter()
GetWriter() exposes System.err as a wrapper around Writer to match the .NET platform, which provides Console.Error as a TextWriter.

Returns:
an instance of XPWriter wrapping the platform standard error output stream.


Copyright 2002, 2003, 2004 Plumtree Software Inc. All Rights Reserved.