|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
edu.udo.cs.miningmart.m4.utils.MultipleOutputStream
A MultipleOutputStream
holds several OutputStream
s.
Each method called by this OutputStream
is forwarded to the set of OutputStream
s.
So you can write something to System.out
and to a file.
Constructor Summary | |
MultipleOutputStream()
Inits this MultipleOutputStream containing no OutputStream . |
|
MultipleOutputStream(java.util.Collection outputStreams)
Inits this MultipleOutputStream with the specified Collection of OutputStream s. |
|
MultipleOutputStream(java.io.OutputStream stream)
Inits this MultipleOutputStream only containing th specified OutputStream . |
Method Summary | |
void |
addOutputStream(java.io.OutputStream stream)
Adds the OutputStream . |
void |
close()
|
boolean |
containsOutputStream(java.io.OutputStream stream)
Checks wether the OutputStream is available or not. |
void |
flush()
|
int |
getNumberOfOutputStreams()
Gets the number of OutputStream s. |
java.io.OutputStream |
getOutputStream(int index)
Gets the OutputStream by its index. |
boolean |
removeOutputStream(java.io.OutputStream stream)
Removes the OutputStream . |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MultipleOutputStream()
MultipleOutputStream
containing no OutputStream
.
public MultipleOutputStream(java.io.OutputStream stream)
MultipleOutputStream
only containing th specified OutputStream
.
public MultipleOutputStream(java.util.Collection outputStreams)
MultipleOutputStream
with the specified Collection
of OutputStream
s.
Method Detail |
public void close() throws java.io.IOException
java.io.IOException
OutputStream.close()
public void flush() throws java.io.IOException
java.io.IOException
OutputStream.flush()
public void write(byte[] b, int off, int len) throws java.io.IOException
java.io.IOException
OutputStream.write(byte[], int, int)
public void write(byte[] b) throws java.io.IOException
java.io.IOException
OutputStream.write(byte[])
public void write(int b) throws java.io.IOException
java.io.IOException
OutputStream.write(int)
public int getNumberOfOutputStreams()
OutputStream
s.
public java.io.OutputStream getOutputStream(int index)
OutputStream
by its index.
public void addOutputStream(java.io.OutputStream stream)
OutputStream
.
public boolean removeOutputStream(java.io.OutputStream stream)
OutputStream
.
public boolean containsOutputStream(java.io.OutputStream stream)
OutputStream
is available or not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |