de.schlichtherle.truezip.io
Class DecoratingOutputStream
java.lang.Object
java.io.OutputStream
de.schlichtherle.truezip.io.DecoratingOutputStream
- All Implemented Interfaces:
- Closeable, Flushable
- Direct Known Subclasses:
- ConcurrentOutputShop.ConcurrentOutputStream, FsMultiplexedArchiveOutputShop.EntryOutputStream, FsMultiplexedArchiveOutputShop.TempEntryOutputStream, FsStatistics.CountingOutputStream, IOCache.Buffer.BufferOutputStream, LazyOutputSocket.ProxyOutputStream, LEDataOutputStream, SynchronizedOutputStream
public abstract class DecoratingOutputStream
- extends OutputStream
An abstract decorator for an output stream.
This is a clean room implementation of its cousin FilterOutputStream
in the JSE, but optimized for performance and without
multithreading support.
- Author:
- Christian Schlichtherle
- See Also:
DecoratingInputStream
|
Method Summary |
void |
close()
|
void |
flush()
|
String |
toString()
Returns a string representation of this object for debugging and logging
purposes. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
delegate
@Nullable
protected OutputStream delegate
- The nullable decorated output stream.
DecoratingOutputStream
protected DecoratingOutputStream(OutputStream out)
- Constructs a new synchronized output stream.
This object will synchronize on itself.
- Parameters:
out - the output stream to wrap in this decorator.
write
public void write(int b)
throws IOException
- Specified by:
write in class OutputStream
- Throws:
IOException
write
public final void write(byte[] b)
throws IOException
- Overrides:
write in class OutputStream
- Throws:
IOException
write
public void write(byte[] b,
int off,
int len)
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
close
public void close()
throws IOException
- Specified by:
close in interface Closeable- Overrides:
close in class OutputStream
- Throws:
IOException
toString
public String toString()
- Returns a string representation of this object for debugging and logging
purposes.
- Overrides:
toString in class Object
Copyright © 2005-2011 Schlichtherle IT Services. All Rights Reserved.