Class CloseableEmptyInputStream
- java.lang.Object
-
- java.io.InputStream
-
- org.apache.sshd.common.util.io.input.EmptyInputStream
-
- org.apache.sshd.common.util.io.input.CloseableEmptyInputStream
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,java.nio.channels.Channel
public class CloseableEmptyInputStream extends EmptyInputStream implements java.nio.channels.Channel
A/dev/nullstream that can be closed - in which case it will throwIOExceptions if invoked after being closed
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicBooleanopen-
Fields inherited from class org.apache.sshd.common.util.io.input.EmptyInputStream
DEV_NULL
-
-
Constructor Summary
Constructors Constructor Description CloseableEmptyInputStream()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intavailable()voidclose()booleanisOpen()intread()intread(byte[] b, int off, int len)voidreset()longskip(long n)-
Methods inherited from class org.apache.sshd.common.util.io.input.EmptyInputStream
mark
-
-
-
-
Method Detail
-
isOpen
public boolean isOpen()
- Specified by:
isOpenin interfacejava.nio.channels.Channel
-
available
public int available() throws java.io.IOException- Overrides:
availablein classEmptyInputStream- Throws:
java.io.IOException
-
read
public int read() throws java.io.IOException- Overrides:
readin classEmptyInputStream- Throws:
java.io.IOException
-
read
public int read(byte[] b, int off, int len) throws java.io.IOException- Overrides:
readin classEmptyInputStream- Throws:
java.io.IOException
-
skip
public long skip(long n) throws java.io.IOException- Overrides:
skipin classEmptyInputStream- Throws:
java.io.IOException
-
reset
public void reset() throws java.io.IOException- Overrides:
resetin classEmptyInputStream- Throws:
java.io.IOException
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.nio.channels.Channel- Specified by:
closein interfacejava.io.Closeable- Overrides:
closein classjava.io.InputStream- Throws:
java.io.IOException
-
-