Package hsa
Class Stdout
- java.lang.Object
-
- hsa.Stdout
-
public class Stdout extends java.lang.ObjectThe 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
-
-
Constructor Summary
Constructors Constructor Description Stdout()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidclose()Close Stdout to further writing.static voidprint(boolean value)Write the text representation of a boolean to standard output.static voidprint(boolean value, int fieldSize)Write the text representation of a boolean to standard output with a specified field size.static voidprint(byte number)Write the text representation of an 8-bit integer (a "byte") to standard output.static voidprint(byte number, int fieldSize)Write the text representation of an 8-bit integer (a "byte") to standard output with a specified field size.static voidprint(char ch)Write a character to standard output.static voidprint(char ch, int fieldSize)Write a character to standard output with a specified field size..static voidprint(double number)Write a double precision floating point number (a "double") to standard output.static voidprint(double number, int fieldSize)Write a double precision floating point number (a "double") to standard output with a specified field size.static voidprint(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 voidprint(float number)Write a floating point number (a "float") to standard output.static voidprint(float number, int fieldSize)Write a floating point number (a "float") to standard output with a specified field size.static voidprint(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 voidprint(int number)Write the text representation of an 32-bit integer (an "int") to standard output.static voidprint(int number, int fieldSize)Write the text representation of an 32-bit integer (an "int") to standard output with a specified field size.static voidprint(long number)Write the text representation of an 64-bit integer (a "long") to standard output.static voidprint(long number, int fieldSize)Write the text representation of an 64-bit integer (a "long") to standard output with a specified field size.static voidprint(short number)Write the text representation of an 16-bit integer (a "short") to standard output.static voidprint(short number, int fieldSize)Write the text representation of an 16-bit integer (a "short") to standard output with a specified field size.static voidprint(java.lang.String text)Write a string to standard output.static voidprint(java.lang.String text, int fieldSize)Write a string to standard output with a specified field size..static voidprintln()Write a newline to standard output.static voidprintln(boolean value)Write the text representation of a boolean to standard output followed by a newline.static voidprintln(boolean value, int fieldSize)Write the text representation of a boolean to standard output with a specified field size followed by a newline.static voidprintln(byte number)Write the text representation of an 8-bit integer (a "byte") to standard output followed by a newline.static voidprintln(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 voidprintln(char ch)Write a character to standard output followed by a newline.static voidprintln(char ch, int fieldSize)Write a character to standard output with a specified field size..static voidprintln(double number)Write a double precision floating point number (a "double") to standard output followed by a newline.static voidprintln(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 voidprintln(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 voidprintln(float number)Write a floating point number (a "float") to standard output followed by a newline.static voidprintln(float number, int fieldSize)Write a floating point number (a "float") to standard output with a specified field size followed by a newline.static voidprintln(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 voidprintln(int number)Write the text representation of an 32-bit integer (an "int") to standard output followed by a newline.static voidprintln(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 voidprintln(long number)Write the text representation of an 64-bit integer (a "long") to standard output followed by a newline.static voidprintln(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 voidprintln(short number)Write the text representation of an 16-bit integer (a "short") to standard output followed by a newline.static voidprintln(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 voidprintln(java.lang.String text)Write a string to standard output followed by a newline.static voidprintln(java.lang.String text, int fieldSize)Write a string to standard output with a specified field size followed by a newline.
-
-
-
Method Detail
-
close
public static void close()
Close Stdout to further writing.
-
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(java.lang.String text)
Write a string to standard output.- Parameters:
text- The string to be written to standard output.
-
print
public static void print(java.lang.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.
-
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(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.
-
println
public static void println()
Write a newline to standard output.
-
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(java.lang.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(java.lang.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.
-
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(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.
-
-