|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
com.compoze.util.MultiOutputStream
public class MultiOutputStream
This class writes output to this OutputStream synchronously to any number of underlying OutputStreams.
Constructor Summary | |
---|---|
MultiOutputStream()
Constructor. |
|
MultiOutputStream(java.util.Collection outputStreams)
Constructor. |
|
MultiOutputStream(java.io.OutputStream[] outputStreams)
Constructor. |
Method Summary | |
---|---|
void |
addOutputStream(java.io.OutputStream os)
Add an output stream to the list output streams that are written to. |
void |
close()
Close all underlying output streams. |
void |
flush()
Flush all underlying output streams. |
void |
removeOutputStream(java.io.OutputStream os)
Remove an output stream from the list of output streams that are written to. |
void |
write(byte[] bytes)
Write to all underlying output streams. |
void |
write(byte[] bytes,
int iOffset,
int iLength)
Write to all underlying output streams. |
void |
write(int i)
Write to all underlying output streams. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MultiOutputStream()
public MultiOutputStream(java.io.OutputStream[] outputStreams)
outputStreams
- an array of output stream to write topublic MultiOutputStream(java.util.Collection outputStreams)
outputStreams
- a collection of output stream to write toMethod Detail |
---|
public void addOutputStream(java.io.OutputStream os)
os
- the output stream to addpublic void removeOutputStream(java.io.OutputStream os)
os
- the output stream to addpublic void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in class java.io.OutputStream
java.io.IOException
- if an i/o error occurspublic void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.OutputStream
java.io.IOException
- if an i/o error occurspublic void write(int i) throws java.io.IOException
write
in class java.io.OutputStream
i
- the byte to write
java.io.IOException
public void write(byte[] bytes) throws java.io.IOException
write
in class java.io.OutputStream
bytes
- the byte array to write
java.io.IOException
public void write(byte[] bytes, int iOffset, int iLength) throws java.io.IOException
write
in class java.io.OutputStream
bytes
- to byte array to writeiOffset
- offset in arrayiLength
- number of bytes to write
java.io.IOException
|
Oracle | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |