java.lang.Object
java.io.OutputStream
java.io.PipedOutputStream
net.i2p.util.TimeoutPipedOutputStream
- All Implemented Interfaces:
Closeable, Flushable, AutoCloseable
Helper for TimeoutPipedInputStream. There isn't any timeout implemented here.
To support InternalSocket.setSoTimeout(int). Package private, not a part of the public API, not for general use.
- See Also:
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final TimeoutPipedInputStreamThe stream that receives the bytes written here.Constructor Summary
ConstructorsConstructorDescriptionConnects this stream to the timeout-aware pipe that will read it.Method Summary
All MethodsMethods inherited from class PipedOutputStream
connect, flush, write, writeMethods inherited from class OutputStream
nullOutputStream, write
Field Details
sink
The stream that receives the bytes written here.
Constructor Details
TimeoutPipedOutputStream
Connects this stream to the timeout-aware pipe that will read it.- Parameters:
snk- the pipe to feed, which also gets notified when this stream closes- Throws:
IOException- if the sink is already connected to another output stream
Method Details
close
Overridden only so we can tell snk. We have to do this because TPIS can't get to pkg private receivedLast() in super.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classPipedOutputStream- Throws:
IOException