eos.util
Class Out

java.lang.Object
  extended by eos.util.Out

public class Out
extends java.lang.Object

This class provides methods for writing strings and numbers to various output streams, including standard output, file, and sockets.

For additional documentation, see Section 3.1 of Introduction to Programming in Java: An Interdisciplinary Approach by Robert Sedgewick and Kevin Wayne.


Constructor Summary
Out()
          Create an Out object using standard output.
Out(java.io.OutputStream os)
          Create an Out object using an OutputStream.
Out(java.net.Socket socket)
          Create an Out object using a Socket.
Out(java.lang.String s)
          Create an Out object using a file specified by the given name.
 
Method Summary
 void close()
          Close the output stream.
static void main(java.lang.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(java.lang.Object x)
          Print an object and then flush the output stream.
 void printf(java.util.Locale locale, java.lang.String format, java.lang.Object... args)
          Print a formatted string using the specified locale, format string and arguments, and then flush the output stream.
 void printf(java.lang.String format, java.lang.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(java.lang.Object x)
          Print an object 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

Out

public Out(java.io.OutputStream os)
Create an Out object using an OutputStream.


Out

public Out()
Create an Out object using standard output.


Out

public Out(java.net.Socket socket)
Create an Out object using a Socket.


Out

public Out(java.lang.String s)
Create an Out object using a file specified by the given name.

Method Detail

close

public void close()
Close the output stream.


println

public void println()
Terminate the line.


println

public void println(java.lang.Object x)
Print an object and then terminate the line.


println

public void println(boolean x)
Print a boolean and then terminate the line.


println

public void println(char x)
Print a char and then terminate the line.


println

public void println(double x)
Print an double and then terminate the line.


println

public void println(float x)
Print a float and then terminate the line.


println

public void println(int x)
Print an int and then terminate the line.


println

public void println(long x)
Print a long and then terminate the line.


println

public void println(byte x)
Print a byte and then terminate the line.


print

public void print()
Flush the output stream.


print

public void print(java.lang.Object x)
Print an object and then flush the output stream.


print

public void print(boolean x)
Print an boolean and then flush the output stream.


print

public void print(char x)
Print an char and then flush the output stream.


print

public void print(double x)
Print an double and then flush the output stream.


print

public void print(float x)
Print a float and then flush the output stream.


print

public void print(int x)
Print an int and then flush the output stream.


print

public void print(long x)
Print a long and then flush the output stream.


print

public void print(byte x)
Print a byte and then flush the output stream.


printf

public void printf(java.lang.String format,
                   java.lang.Object... args)
Print a formatted string using the specified format string and arguments, and then flush the output stream.


printf

public void printf(java.util.Locale locale,
                   java.lang.String format,
                   java.lang.Object... args)
Print a formatted string using the specified locale, format string and arguments, and then flush the output stream.


main

public static void main(java.lang.String[] args)
A test client.