public class Out extends Object
For additional documentation, see Section 3.1 of Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.
Constructor and Description |
---|
Out()
Create an Out object using standard output.
|
Out(OutputStream os)
Create an Out object using an OutputStream.
|
Out(Socket socket)
Create an Out object using a Socket.
|
Out(String s)
Create an Out object using a file specified by the given name.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the output stream.
|
static void |
main(String[] args)
A test client.
|
void |
print()
Flush the output stream.
|
void |
print(boolean x)
Print an boolean and then flush the output stream.
|
void |
print(byte x)
Print a byte and then flush the output stream.
|
void |
print(char x)
Print an char and then flush the output stream.
|
void |
print(double x)
Print an double and then flush the output stream.
|
void |
print(float x)
Print a float and then flush the output stream.
|
void |
print(int x)
Print an int and then flush the output stream.
|
void |
print(long x)
Print a long and then flush the output stream.
|
void |
print(Object x)
Print an object and then flush the output stream.
|
void |
printf(Locale locale,
String format,
Object... args)
Print a formatted string using the specified locale, format string and arguments,
and then flush the output stream.
|
void |
printf(String format,
Object... args)
Print a formatted string using the specified format string and arguments,
and then flush the output stream.
|
void |
println()
Terminate the line.
|
void |
println(boolean x)
Print a boolean and then terminate the line.
|
void |
println(byte x)
Print a byte and then terminate the line.
|
void |
println(char x)
Print a char and then terminate the line.
|
void |
println(double x)
Print an double and then terminate the line.
|
void |
println(float x)
Print a float and then terminate the line.
|
void |
println(int x)
Print an int and then terminate the line.
|
void |
println(long x)
Print a long and then terminate the line.
|
void |
println(Object x)
Print an object and then terminate the line.
|
public Out(OutputStream os)
public Out()
public Out(Socket socket)
public Out(String s)
public void close()
public void println()
public void println(Object x)
public void println(boolean x)
public void println(char x)
public void println(double x)
public void println(float x)
public void println(int x)
public void println(long x)
public void println(byte x)
public void print()
public void print(Object x)
public void print(boolean x)
public void print(char x)
public void print(double x)
public void print(float x)
public void print(int x)
public void print(long x)
public void print(byte x)
public void printf(String format, Object... args)
public void printf(Locale locale, String format, Object... args)
public static void main(String[] args)