public class CloseableEmptyInputStream extends EmptyInputStream implements java.nio.channels.Channel
/dev/null stream that can be closed - in which case it will throw IOExceptions if invoked after
being closed| Modifier and Type | Field and Description |
|---|---|
private java.util.concurrent.atomic.AtomicBoolean |
open |
DEV_NULL| Constructor and Description |
|---|
CloseableEmptyInputStream() |
| Modifier and Type | Method and Description |
|---|---|
int |
available() |
void |
close() |
boolean |
isOpen() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
void |
reset() |
long |
skip(long n) |
markpublic boolean isOpen()
isOpen in interface java.nio.channels.Channelpublic int available()
throws java.io.IOException
available in class EmptyInputStreamjava.io.IOExceptionpublic int read()
throws java.io.IOException
read in class EmptyInputStreamjava.io.IOExceptionpublic int read(byte[] b,
int off,
int len)
throws java.io.IOException
read in class EmptyInputStreamjava.io.IOExceptionpublic long skip(long n)
throws java.io.IOException
skip in class EmptyInputStreamjava.io.IOExceptionpublic void reset()
throws java.io.IOException
reset in class EmptyInputStreamjava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in interface java.nio.channels.Channelclose in class java.io.InputStreamjava.io.IOException