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 Buffer
private final Condition
private final LocalWindow
private final Lock
private final AtomicBoolean
private long
private final AtomicBoolean
ChannelPipedOutputStream
is 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, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
Field Details
-
localWindow
-
b
private final byte[] b -
open
-
lock
-
dataAvailable
-
writerClosed
ChannelPipedOutputStream
is already closed and so we will not receive additional data. This is different from theisOpen()
, which indicates that the reader of thisInputStream
will 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:
available
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
eof
public void eof()Description copied from interface:ChannelPipedSink
Signal end of writing to the sink- Specified by:
eof
in interfaceChannelPipedSink
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
receive
- Specified by:
receive
in interfaceChannelPipedSink
- Parameters:
bytes
- Bytes to be sent to the sinkoff
- Offset in bufferlen
- Number of bytes- Throws:
IOException
- If failed to send the data
-