|
|||||||||
| 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
public class MultipleOutputStream
A MultipleOutputStream holds several OutputStreams.
Each method called by this OutputStream is forwarded to the set of OutputStreams.
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 OutputStreams. |
|
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 OutputStreams. |
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 OutputStreams.
| Method Detail |
|---|
public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in class java.io.OutputStreamjava.io.IOExceptionOutputStream.close()
public void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.OutputStreamjava.io.IOExceptionOutputStream.flush()
public void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(byte[], int, int)
public void write(byte[] b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(byte[])
public void write(int b)
throws java.io.IOException
write in class java.io.OutputStreamjava.io.IOExceptionOutputStream.write(int)public int getNumberOfOutputStreams()
OutputStreams.
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 | ||||||||