java.io
Class PrintStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.PrintStream

public class PrintStream
extends OutputStream

Minimal implementation of PrintStream. Currently only implements the mandatory write method and println.

Author:
Lawrie Griffiths

Constructor Summary
PrintStream(OutputStream os)
           
 
Method Summary
 void flush()
          Flush any pending output in the stream
 void print(String s)
          Writes a string to the underlying output stream.
 void println(String s)
          Writes a string followed by a newline character to the underlying output stream.
 void write(int c)
          Writes the specified byte to this output stream.
 
Methods inherited from class java.io.OutputStream
close, write, write
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait
 

Constructor Detail

PrintStream

public PrintStream(OutputStream os)
Method Detail

write

public void write(int c)
Description copied from class: OutputStream
Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.

Subclasses of OutputStream must provide an implementation for this method.

Specified by:
write in class OutputStream
Parameters:
c - the byte.

print

public void print(String s)
Writes a string to the underlying output stream.

Parameters:
s - the string to print

flush

public void flush()
Flush any pending output in the stream

Overrides:
flush in class OutputStream

println

public void println(String s)
Writes a string followed by a newline character to the underlying output stream.

Parameters:
s - the string to print