Package org.apache.sshd.common.channel
Class ChannelPipedInputStream
java.lang.Object
java.io.InputStream
org.apache.sshd.common.channel.ChannelPipedInputStream
- All Implemented Interfaces:
Closeable,AutoCloseable,Channel,ChannelPipedSink
TODO Add javadoc
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final byte[]private Bufferprivate final Conditionprivate final LocalWindowprivate final Lockprivate final AtomicBooleanprivate longprivate final AtomicBooleanChannelPipedOutputStreamis already closed and so we will not receive additional data. -
Constructor Summary
ConstructorsConstructorDescriptionChannelPipedInputStream(LocalWindow localWindow, long windowTimeout) ChannelPipedInputStream(LocalWindow localWindow, Duration windowTimeout) ChannelPipedInputStream(PropertyResolver resolver, LocalWindow localWindow) -
Method Summary
Methods inherited from class java.io.InputStream
mark, markSupported, read, reset, skip
-
Field Details
-
localWindow
-
b
private final byte[] b -
open
-
lock
-
dataAvailable
-
writerClosed
ChannelPipedOutputStreamis already closed and so we will not receive additional data. This is different from theisOpen(), which indicates that the reader of thisInputStreamwill not be reading data any more. -
buffer
-
timeout
private long timeout
-
-
Constructor Details
-
ChannelPipedInputStream
-
ChannelPipedInputStream
-
ChannelPipedInputStream
-
-
Method Details
-
isOpen
public boolean isOpen() -
setTimeout
public void setTimeout(long timeout) -
getTimeout
public long getTimeout() -
available
- Overrides:
availablein classInputStream- Throws:
IOException
-
read
- Specified by:
readin classInputStream- Throws:
IOException
-
read
- Overrides:
readin classInputStream- Throws:
IOException
-
eof
public void eof()Description copied from interface:ChannelPipedSinkSignal end of writing to the sink- Specified by:
eofin interfaceChannelPipedSink
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceChannel- Specified by:
closein interfaceCloseable- Overrides:
closein classInputStream- Throws:
IOException
-
receive
- Specified by:
receivein interfaceChannelPipedSink- Parameters:
bytes- Bytes to be sent to the sinkoff- Offset in bufferlen- Number of bytes- Throws:
IOException- If failed to send the data
-