ariba.util.io
Class MultiOutputStream
java.lang.Object
java.io.OutputStream
ariba.util.io.MultiOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
public class MultiOutputStream
- extends OutputStream
MultiOutputStream
Multiplex over multiple OutputStreams.
MultiOutputStream
public MultiOutputStream()
MultiOutputStream
public MultiOutputStream(OutputStream stream)
addStream
public void addStream(OutputStream s)
addStream
public void addStream(OutputStream s,
boolean buffered)
removeStream
public void removeStream(OutputStream s)
flushIfNotBuffered
public void flushIfNotBuffered()
throws IOException
- Called when we only want to flush cheap streams.
For example, in logging, we always want to flush to the
console, but we want to be lazy about forcing it to the file.
- Throws:
IOException
write
public void write(int b)
throws IOException
- Specified by:
write in class OutputStream
- Throws:
IOException
write
public void write(byte[] b)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
write
public void write(byte[] b,
int offset,
int length)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
flush
public void flush()
throws IOException
- Specified by:
flush in interface Flushable- Overrides:
flush in class OutputStream
- Throws:
IOException
count
public int count()
isEmpty
public boolean isEmpty()
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class OutputStream
- Throws:
IOException
AribaWeb User Interface Development Framework
Copyright © 2000-2009 Ariba, Inc. All Rights Reserved.