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.PipedOutputStream
Piped 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 void
close()
void
flush()
java.io.InputStream
getInputStream()
void
setReceived(boolean value)
void
write(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:
write
in classjava.io.PipedOutputStream
- Throws:
java.io.IOException
-
flush
public void flush() throws java.io.IOException
- Specified by:
flush
in interfacejava.io.Flushable
- Overrides:
flush
in classjava.io.PipedOutputStream
- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfacejava.io.Closeable
- Overrides:
close
in classjava.io.PipedOutputStream
- Throws:
java.io.IOException
-
setReceived
public void setReceived(boolean value)
-
-