public class FileOutput
extends java.lang.Object
java.io.PrintWriter.| Constructor and Description |
|---|
FileOutput()
Open an output channel to the console.
|
FileOutput(java.lang.String outputFileName)
Open the output file.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the output file or channel.
|
void |
print(char c)
Print a
char to the output file or channel. |
void |
print(double d)
Print a
double to the output file or channel. |
void |
print(int i)
Print an
int to the output file or channel. |
void |
print(java.lang.Object o)
Print an
Object, e.g., a String, to the output file or channel. |
void |
print(java.lang.String fmt,
double d)
Print a formatted
double to the output file or channel. |
void |
print(java.lang.String fmt,
double[] da)
Print a formatted
double [] to the output file or channel. |
void |
print(java.lang.String fmt,
int i)
Print a formatted
int to the output file or channel. |
void |
print(java.lang.String fmt,
int[] ia)
Print a formatted
int [] to the output file or channel. |
void |
print(java.lang.String fmt,
java.lang.String s)
Print a formatted
String to the output file or channel. |
void |
print(java.lang.String fmt,
java.lang.String[] sa)
Print a formatted
String [] to the output file or channel. |
void |
println()
Print a line-feed character to the output file or channel.
|
void |
println(char c)
Print a
char and line-feed character to the output file or channel. |
void |
println(double d)
Print a
double and line-feed character to the output file or channel. |
void |
println(int i)
Print an
int and line-feed character to the output file or channel. |
void |
println(java.lang.Object o)
Print an
Object, e.g., a String, and line-feed character to the output file or channel. |
void |
println(java.lang.String fmt,
double d)
Print a formatted
double and line-feed character to the output file or channel. |
void |
println(java.lang.String fmt,
double[] da)
Print a formatted
double [] and line-feed character to the output file or channel. |
void |
println(java.lang.String fmt,
int i)
Print a formatted
int and line-feed character to the output file or channel. |
void |
println(java.lang.String fmt,
int[] ia)
Print a formatted
int [] and line-feed character to the output file or channel. |
void |
println(java.lang.String fmt,
java.lang.String s)
Print a formatted
String and line-feed character to the output file or channel. |
void |
println(java.lang.String fmt,
java.lang.String[] sa)
Print a formatted
String [] and line-feed character to the output file or channel. |
public FileOutput(java.lang.String outputFileName)
outputFileName - The output file name.public FileOutput()
public void close()
public void print(int i)
int to the output file or channel.i - The int to print.public void print(double d)
double to the output file or channel.d - The double to print.public void print(char c)
char to the output file or channel.c - The char to print.public void print(java.lang.Object o)
Object, e.g., a String, to the output file or channel.o - The Object to print.public void print(java.lang.String fmt,
int i)
int to the output file or channel.fmt - The format String, e.g., "%5d".i - The int to print.public void print(java.lang.String fmt,
double d)
double to the output file or channel.fmt - The format String, e.g., "%6.2f".d - The double to print.public void print(java.lang.String fmt,
java.lang.String s)
String to the output file or channel.fmt - The format String, e.g., "%12s".s - The String to print.public void print(java.lang.String fmt,
int[] ia)
int [] to the output file or channel.fmt - The format String, e.g., "%5d". Note that fmt refers to a single array element, and that each array element is front-padded with two spaces.ia - The int [] to print.public void print(java.lang.String fmt,
double[] da)
double [] to the output file or channel.fmt - The format String, e.g., "%6.2f". Note that fmt refers to a single array element, and that each array element is front-padded with two spaces.da - The double [] to print.public void print(java.lang.String fmt,
java.lang.String[] sa)
String [] to the output file or channel.fmt - The format String, e.g., "%12s". Note that fmt refers to a single array element, and that each array element is front-padded with two spaces.sa - The String [] to print.public void println()
public void println(int i)
int and line-feed character to the output file or channel.i - The int to print.public void println(double d)
double and line-feed character to the output file or channel.d - The double to print.public void println(char c)
char and line-feed character to the output file or channel.c - The char to print.public void println(java.lang.Object o)
Object, e.g., a String, and line-feed character to the output file or channel.o - The Object to print.public void println(java.lang.String fmt,
int i)
int and line-feed character to the output file or channel.fmt - The format String, e.g., "%5d".i - The int to print.public void println(java.lang.String fmt,
double d)
double and line-feed character to the output file or channel.fmt - The format String, e.g., "%6.2f".d - The double to print.public void println(java.lang.String fmt,
java.lang.String s)
String and line-feed character to the output file or channel.fmt - The format String, e.g., "%12s".s - The String to print.public void println(java.lang.String fmt,
int[] ia)
int [] and line-feed character to the output file or channel.fmt - The format String, e.g., "%5d". Note that fmt refers to a single array element, and that each array element is front-padded with two spaces.ia - The int [] to print.public void println(java.lang.String fmt,
double[] da)
double [] and line-feed character to the output file or channel.fmt - The format String, e.g., "%6.2f". Note that fmt refers to a single array element, and that each array element is front-padded with two spaces.da - The double [] to print.public void println(java.lang.String fmt,
java.lang.String[] sa)
String [] and line-feed character to the output file or channel.fmt - The format String, e.g., "%12s". Note that fmt refers to a single array element, and that each array element is front-padded with two spaces.sa - The String [] to print.