Package org.apache.tools.ant.util
Class TeeOutputStream
java.lang.Object
java.io.OutputStream
org.apache.tools.ant.util.TeeOutputStream
- All Implemented Interfaces:
- Closeable,- Flushable,- AutoCloseable
A simple T-piece to replicate an output stream into two separate streams
- 
Constructor SummaryConstructorsConstructorDescriptionTeeOutputStream(OutputStream left, OutputStream right) Constructor for TeeOutputStream.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Close both output streams.voidflush()Flush both output streams.voidwrite(byte[] b) Write a byte array to both output streams.voidwrite(byte[] b, int off, int len) Write a byte array to both output streams.voidwrite(int b) Write a byte to both output streams.Methods inherited from class java.io.OutputStreamnullOutputStream
- 
Constructor Details- 
TeeOutputStreamConstructor for TeeOutputStream.- Parameters:
- left- one of the output streams.
- right- the other output stream.
 
 
- 
- 
Method Details- 
closeClose both output streams.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Overrides:
- closein class- OutputStream
- Throws:
- IOException- on error.
 
- 
flushFlush both output streams.- Specified by:
- flushin interface- Flushable
- Overrides:
- flushin class- OutputStream
- Throws:
- IOException- on error
 
- 
writeWrite a byte array to both output streams.- Overrides:
- writein class- OutputStream
- Parameters:
- b- an array of bytes.
- Throws:
- IOException- on error.
 
- 
writeWrite a byte array to both output streams.- Overrides:
- writein class- OutputStream
- Parameters:
- b- the data.
- off- the start offset in the data.
- len- the number of bytes to write.
- Throws:
- IOException- on error.
 
- 
writeWrite a byte to both output streams.- Specified by:
- writein class- OutputStream
- Parameters:
- b- the byte to write.
- Throws:
- IOException- on error.
 
 
-