Package com.mku.streams
Class BlockingInputOutputAdapterStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.PipedOutputStream
-
- com.mku.streams.BlockingInputOutputAdapterStream
-
- All Implemented Interfaces:
java.io.Closeable,java.io.Flushable,java.lang.AutoCloseable
public class BlockingInputOutputAdapterStream extends java.io.PipedOutputStreamPiped input and outputstream with blocking flush and close.
-
-
Constructor Summary
Constructors Constructor Description BlockingInputOutputAdapterStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voidflush()java.io.InputStreamgetInputStream()voidsetReceived(boolean value)voidwrite(byte[] buffer, int offset, int count)
-
-
-
Method Detail
-
getInputStream
public java.io.InputStream getInputStream()
-
write
public void write(byte[] buffer, int offset, int count) throws java.io.IOException- Overrides:
writein classjava.io.PipedOutputStream- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException- Specified by:
flushin interfacejava.io.Flushable- Overrides:
flushin classjava.io.PipedOutputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.PipedOutputStream- Throws:
java.io.IOException
-
setReceived
public void setReceived(boolean value)
-
-