Class Stdout

java.lang.Object
  extended by Stdout

public class Stdout
extends Object

The Stdout class writes text to standard output. The class is a superset of PrintWriter adding formatted output and integrated error checking.

This class is not meant to be instantiated.

Full documentation for the classes in the hsa package available at:
http://www.holtsoft.com/java/hsa_package.html

Version:
2.0 99/02/01
Author:
Tom West

Constructor Summary
Stdout()
           
 
Method Summary
static void close()
          Close Stdout to further writing.
static void print(boolean value)
          Write the text representation of a boolean to standard output.
static void print(boolean value, int fieldSize)
          Write the text representation of a boolean to standard output with a specified field size.
static void print(byte number)
          Write the text representation of an 8-bit integer (a "byte") to standard output.
static void print(byte number, int fieldSize)
          Write the text representation of an 8-bit integer (a "byte") to standard output with a specified field size.
static void print(char ch)
          Write a character to standard output.
static void print(char ch, int fieldSize)
          Write a character to standard output with a specified field size..
static void print(double number)
          Write a double precision floating point number (a "double") to standard output.
static void print(double number, int fieldSize)
          Write a double precision floating point number (a "double") to standard output with a specified field size.
static void print(double number, int fieldSize, int decimalPlaces)
          Write a double precision floating point number (a "double") to standard output with a specified field size and a specified number of decimal places.
static void print(float number)
          Write a floating point number (a "float") to standard output.
static void print(float number, int fieldSize)
          Write a floating point number (a "float") to standard output with a specified field size.
static void print(float number, int fieldSize, int decimalPlaces)
          Write a floating point number (a "double") to standard output with a specified field size and a specified number of decimal places.
static void print(int number)
          Write the text representation of an 32-bit integer (an "int") to standard output.
static void print(int number, int fieldSize)
          Write the text representation of an 32-bit integer (an "int") to standard output with a specified field size.
static void print(long number)
          Write the text representation of an 64-bit integer (a "long") to standard output.
static void print(long number, int fieldSize)
          Write the text representation of an 64-bit integer (a "long") to standard output with a specified field size.
static void print(short number)
          Write the text representation of an 16-bit integer (a "short") to standard output.
static void print(short number, int fieldSize)
          Write the text representation of an 16-bit integer (a "short") to standard output with a specified field size.
static void print(String text)
          Write a string to standard output.
static void print(String text, int fieldSize)
          Write a string to standard output with a specified field size..
static void println()
          Write a newline to standard output.
static void println(boolean value)
          Write the text representation of a boolean to standard output followed by a newline.
static void println(boolean value, int fieldSize)
          Write the text representation of a boolean to standard output with a specified field size followed by a newline.
static void println(byte number)
          Write the text representation of an 8-bit integer (a "byte") to standard output followed by a newline.
static void println(byte number, int fieldSize)
          Write the text representation of an 8-bit integer (a "byte") to standard output with a specified field size followed by a newline.
static void println(char ch)
          Write a character to standard output followed by a newline.
static void println(char ch, int fieldSize)
          Write a character to standard output with a specified field size..
static void println(double number)
          Write a double precision floating point number (a "double") to standard output followed by a newline.
static void println(double number, int fieldSize)
          Write a double precision floating point number (a "double") to standard output with a specified field size followed by a newline.
static void println(double number, int fieldSize, int decimalPlaces)
          Write a double precision floating point number (a "double") to standard output with a specified field size and a specified number of decimal places followed by a newline.
static void println(float number)
          Write a floating point number (a "float") to standard output followed by a newline.
static void println(float number, int fieldSize)
          Write a floating point number (a "float") to standard output with a specified field size followed by a newline.
static void println(float number, int fieldSize, int decimalPlaces)
          Write a floating point number (a "double") to standard output with a specified field size and a specified number of decimal places followed by a newline.
static void println(int number)
          Write the text representation of an 32-bit integer (an "int") to standard output followed by a newline.
static void println(int number, int fieldSize)
          Write the text representation of an 32-bit integer (an "int") to standard output with a specified field size followed by a newline.
static void println(long number)
          Write the text representation of an 64-bit integer (a "long") to standard output followed by a newline.
static void println(long number, int fieldSize)
          Write the text representation of an 64-bit integer (a "long") to standard output with a specified field size followed by a newline.
static void println(short number)
          Write the text representation of an 16-bit integer (a "short") to standard output followed by a newline.
static void println(short number, int fieldSize)
          Write the text representation of an 16-bit integer (a "short") to standard output with a specified field size followed by a newline.
static void println(String text)
          Write a string to standard output followed by a newline.
static void println(String text, int fieldSize)
          Write a string to standard output with a specified field size followed by a newline.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stdout

public Stdout()
Method Detail

close

public static void close()
Close Stdout to further writing.


print

public static void print(boolean value)
Write the text representation of a boolean to standard output.

Parameters:
value - The boolean to be written to standard output.

print

public static void print(boolean value,
                         int fieldSize)
Write the text representation of a boolean to standard output with a specified field size.

Parameters:
value - The boolean to be written to standard output.
fieldSize - The field width that the boolean is to be written in.

print

public static void print(byte number)
Write the text representation of an 8-bit integer (a "byte") to standard output.

Parameters:
number - The number to be written to the standard output.

print

public static void print(byte number,
                         int fieldSize)
Write the text representation of an 8-bit integer (a "byte") to standard output with a specified field size.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

print

public static void print(char ch)
Write a character to standard output.

Parameters:
ch - The character to be written to standard output.

print

public static void print(char ch,
                         int fieldSize)
Write a character to standard output with a specified field size..

Parameters:
ch - The character to be written to standard output.
fieldSize - The field width that the character is to be written in.

print

public static void print(double number)
Write a double precision floating point number (a "double") to standard output.

Parameters:
number - The number to be written to standard output.

print

public static void print(double number,
                         int fieldSize)
Write a double precision floating point number (a "double") to standard output with a specified field size.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

print

public static void print(double number,
                         int fieldSize,
                         int decimalPlaces)
Write a double precision floating point number (a "double") to standard output with a specified field size and a specified number of decimal places.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.
decimalPlaces - The number of decimal places of the number to be displayed.

print

public static void print(float number)
Write a floating point number (a "float") to standard output.

Parameters:
number - The number to be written to standard output.

print

public static void print(float number,
                         int fieldSize)
Write a floating point number (a "float") to standard output with a specified field size.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

print

public static void print(float number,
                         int fieldSize,
                         int decimalPlaces)
Write a floating point number (a "double") to standard output with a specified field size and a specified number of decimal places.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.
decimalPlaces - The number of decimal places of the number to be displayed.

print

public static void print(int number)
Write the text representation of an 32-bit integer (an "int") to standard output.

Parameters:
number - The number to be written to standard output.

print

public static void print(int number,
                         int fieldSize)
Write the text representation of an 32-bit integer (an "int") to standard output with a specified field size.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

print

public static void print(long number)
Write the text representation of an 64-bit integer (a "long") to standard output.

Parameters:
number - The number to be written to standard output.

print

public static void print(long number,
                         int fieldSize)
Write the text representation of an 64-bit integer (a "long") to standard output with a specified field size.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

print

public static void print(short number)
Write the text representation of an 16-bit integer (a "short") to standard output.

Parameters:
number - The number to be written to standard output.

print

public static void print(short number,
                         int fieldSize)
Write the text representation of an 16-bit integer (a "short") to standard output with a specified field size.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

print

public static void print(String text)
Write a string to standard output.

Parameters:
text - The string to be written to standard output.

print

public static void print(String text,
                         int fieldSize)
Write a string to standard output with a specified field size..

Parameters:
text - The string to be written to standard output.
fieldSize - The field width that the string is to be written in.

println

public static void println()
Write a newline to standard output.


println

public static void println(boolean value)
Write the text representation of a boolean to standard output followed by a newline.

Parameters:
value - The boolean to be written to standard output.

println

public static void println(boolean value,
                           int fieldSize)
Write the text representation of a boolean to standard output with a specified field size followed by a newline.

Parameters:
value - The boolean to be written to standard output.
fieldSize - The field width that the boolean is to be written in.

println

public static void println(byte number)
Write the text representation of an 8-bit integer (a "byte") to standard output followed by a newline.

Parameters:
number - The number to be written to standard output.

println

public static void println(byte number,
                           int fieldSize)
Write the text representation of an 8-bit integer (a "byte") to standard output with a specified field size followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

println

public static void println(char ch)
Write a character to standard output followed by a newline.

Parameters:
ch - The character to be written to standard output.

println

public static void println(char ch,
                           int fieldSize)
Write a character to standard output with a specified field size..

Parameters:
ch - The character to be written to standard output.
fieldSize - The field width that the character is to be written in.

println

public static void println(double number)
Write a double precision floating point number (a "double") to standard output followed by a newline.

Parameters:
number - The number to be written to standard output.

println

public static void println(double number,
                           int fieldSize)
Write a double precision floating point number (a "double") to standard output with a specified field size followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

println

public static void println(double number,
                           int fieldSize,
                           int decimalPlaces)
Write a double precision floating point number (a "double") to standard output with a specified field size and a specified number of decimal places followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.
decimalPlaces - The number of decimal places of the number to be displayed.

println

public static void println(float number)
Write a floating point number (a "float") to standard output followed by a newline.

Parameters:
number - The number to be written to standard output.

println

public static void println(float number,
                           int fieldSize)
Write a floating point number (a "float") to standard output with a specified field size followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

println

public static void println(float number,
                           int fieldSize,
                           int decimalPlaces)
Write a floating point number (a "double") to standard output with a specified field size and a specified number of decimal places followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.
decimalPlaces - The number of decimal places of the number to be displayed.

println

public static void println(int number)
Write the text representation of an 32-bit integer (an "int") to standard output followed by a newline.

Parameters:
number - The number to be written to standard output.

println

public static void println(int number,
                           int fieldSize)
Write the text representation of an 32-bit integer (an "int") to standard output with a specified field size followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

println

public static void println(long number)
Write the text representation of an 64-bit integer (a "long") to standard output followed by a newline.

Parameters:
number - The number to be written to standard output.

println

public static void println(long number,
                           int fieldSize)
Write the text representation of an 64-bit integer (a "long") to standard output with a specified field size followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

println

public static void println(short number)
Write the text representation of an 16-bit integer (a "short") to standard output followed by a newline.

Parameters:
number - The number to be written to standard output.

println

public static void println(short number,
                           int fieldSize)
Write the text representation of an 16-bit integer (a "short") to standard output with a specified field size followed by a newline.

Parameters:
number - The number to be written to standard output.
fieldSize - The field width that the number is to be written in.

println

public static void println(String text)
Write a string to standard output followed by a newline.

Parameters:
text - The string to be written to standard output.

println

public static void println(String text,
                           int fieldSize)
Write a string to standard output with a specified field size followed by a newline.

Parameters:
text - The string to be written to standard output.
fieldSize - The field width that the string is to be written in.