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(boolean v)
          print() Delegates
 void print(char v)
           
 void print(char[] v)
           
 void print(double v)
           
 void print(float v)
           
 void print(int v)
           
 void print(long v)
           
 void print(Object v)
           
 void print(String s)
          Writes a string to the underlying output stream.
 void println(boolean v)
          println() Delegates
 void println(char v)
           
 void println(char[] v)
           
 void println(double v)
           
 void println(float v)
           
 void println(int v)
           
 void println(long v)
           
 void println(Object v)
           
 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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, 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

print

public void print(boolean v)
print() Delegates


print

public void print(char v)

print

public void print(char[] v)

print

public void print(double v)

print

public void print(float v)

print

public void print(int v)

print

public void print(long v)

print

public void print(Object v)

println

public void println(boolean v)
println() Delegates


println

public void println(char v)

println

public void println(char[] v)

println

public void println(double v)

println

public void println(float v)

println

public void println(int v)

println

public void println(long v)

println

public void println(Object v)