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
public class ChannelPipedInputStream extends InputStream implements ChannelPipedSink
TODO Add javadoc- Author:
- Apache MINA SSHD Project
-
-
Constructor Summary
Constructors Constructor Description ChannelPipedInputStream(Window localWindow, long windowTimeout)
ChannelPipedInputStream(Window localWindow, Duration windowTimeout)
ChannelPipedInputStream(PropertyResolver resolver, Window localWindow)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
available()
void
close()
void
eof()
Signal end of writing to the sinklong
getTimeout()
boolean
isOpen()
int
read()
int
read(byte[] b, int off, int len)
void
receive(byte[] bytes, int off, int len)
void
setTimeout(long timeout)
-
Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, transferTo
-
-
-
-
Constructor Detail
-
ChannelPipedInputStream
public ChannelPipedInputStream(PropertyResolver resolver, Window localWindow)
-
ChannelPipedInputStream
public ChannelPipedInputStream(Window localWindow, long windowTimeout)
-
-
Method Detail
-
setTimeout
public void setTimeout(long timeout)
-
getTimeout
public long getTimeout()
-
available
public int available() throws IOException
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
public int read() throws IOException
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
public int read(byte[] b, int off, int len) throws IOException
- 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
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceChannel
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-
receive
public void receive(byte[] bytes, int off, int len) throws IOException
- 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
-
-