@ThreadSafe public class LockOutputStream extends DecoratingOutputStream
OutputShop, via a Lock object.LockInputStream| Modifier and Type | Field and Description |
|---|---|
protected Lock |
lock
The object to synchronize on.
|
delegate| Constructor and Description |
|---|
LockOutputStream(OutputStream out,
Lock lock)
Constructs a new synchronized output stream.
|
protected final Lock lock
@CreatesObligation public LockOutputStream(@Nullable@WillCloseWhenClosed OutputStream out, Lock lock)
out - the output stream to wrap in this decorator.lock - the object to synchronize on.public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class DecoratingOutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class DecoratingOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class DecoratingOutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class DecoratingOutputStreamIOExceptionCopyright © 2005-2013 Schlichtherle IT Services. All Rights Reserved.