org.jscience.io
Class DoublePrintStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by org.jscience.io.DoublePrintStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable

public class DoublePrintStream
extends java.io.PrintStream

a PrintStream that propagates writes to two PrintStream objects


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
DoublePrintStream(java.io.PrintStream stream1, java.io.PrintStream stream2)
          Creates a new DoublePrintStream object.
 
Method Summary
 java.io.PrintStream append(char c)
          DOCUMENT ME!
 boolean checkError()
          DOCUMENT ME!
 void close()
          DOCUMENT ME!
 void flush()
          DOCUMENT ME!
 java.io.PrintStream getPrintStream1()
          DOCUMENT ME!
 java.io.PrintStream getPrintStream2()
          DOCUMENT ME!
 void write(byte[] buf, int off, int len)
          DOCUMENT ME!
 void write(int n)
          DOCUMENT ME!
 
Methods inherited from class java.io.PrintStream
append, append, clearError, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoublePrintStream

public DoublePrintStream(java.io.PrintStream stream1,
                         java.io.PrintStream stream2)
Creates a new DoublePrintStream object.

Parameters:
stream1 - DOCUMENT ME!
stream2 - DOCUMENT ME!
Method Detail

getPrintStream1

public java.io.PrintStream getPrintStream1()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getPrintStream2

public java.io.PrintStream getPrintStream2()
DOCUMENT ME!

Returns:
DOCUMENT ME!

append

public java.io.PrintStream append(char c)
DOCUMENT ME!

Specified by:
append in interface java.lang.Appendable
Overrides:
append in class java.io.PrintStream
Parameters:
c - DOCUMENT ME!
Returns:
DOCUMENT ME!

write

public void write(byte[] buf,
                  int off,
                  int len)
DOCUMENT ME!

Overrides:
write in class java.io.PrintStream
Parameters:
buf - DOCUMENT ME!
off - DOCUMENT ME!
len - DOCUMENT ME!

write

public void write(int n)
DOCUMENT ME!

Overrides:
write in class java.io.PrintStream
Parameters:
n - DOCUMENT ME!

flush

public void flush()
DOCUMENT ME!

Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.PrintStream

close

public void close()
DOCUMENT ME!

Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.PrintStream

checkError

public boolean checkError()
DOCUMENT ME!

Overrides:
checkError in class java.io.PrintStream
Returns:
DOCUMENT ME!