org.fraid.io
Class TeeOutpStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by org.fraid.io.TeeOutpStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable

public class TeeOutpStream
extends java.io.FilterOutputStream

"Tees" an output stream.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
TeeOutpStream(java.io.OutputStream aChainedStream, java.io.OutputStream aTeeStream)
           
 
Method Summary
 void close()
           
 void flush()
           
 java.io.OutputStream getOutput()
           
 java.io.OutputStream getTee()
           
static void main(java.lang.String[] args)
          Test driver
 void reInit(java.io.OutputStream aChainedStream, java.io.OutputStream aTeeStream)
           
 void write(int c)
           
 
Methods inherited from class java.io.FilterOutputStream
write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeeOutpStream

public TeeOutpStream(java.io.OutputStream aChainedStream,
                     java.io.OutputStream aTeeStream)
Method Detail

reInit

public void reInit(java.io.OutputStream aChainedStream,
                   java.io.OutputStream aTeeStream)

getOutput

public java.io.OutputStream getOutput()

getTee

public java.io.OutputStream getTee()

write

public void write(int c)
           throws java.io.IOException
Overrides:
write in class java.io.FilterOutputStream
Throws:
java.io.IOException

close

public void close()
           throws java.io.IOException
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.FilterOutputStream
Throws:
java.io.IOException

flush

public void flush()
           throws java.io.IOException
Specified by:
flush in interface java.io.Flushable
Overrides:
flush in class java.io.FilterOutputStream
Throws:
java.io.IOException

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test driver

Throws:
java.lang.Exception


Fraid (system and language). (C) 2003-2007 Ivaylo Iliev
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.