public class ClosedInputStream
extends java.io.InputStream
IOUtils.EOF to all attempts to read something from an input stream.
Typically uses of this class include testing for corner cases in methods that accept input streams and acting as a
sentinel value instead of a null input stream.
| Modifier and Type | Field and Description |
|---|---|
static ClosedInputStream |
CLOSED_INPUT_STREAM
Deprecated.
Use
INSTANCE. |
static ClosedInputStream |
INSTANCE
The singleton instance.
|
| Constructor and Description |
|---|
ClosedInputStream()
Constructs a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
read()
Returns
-1 to indicate that the stream is closed. |
int |
read(byte[] b,
int off,
int len)
Returns
-1 to indicate that the stream is closed. |
public static final ClosedInputStream INSTANCE
@Deprecated public static final ClosedInputStream CLOSED_INPUT_STREAM
INSTANCE.public int read()
-1 to indicate that the stream is closed.read in class java.io.InputStream-1.public int read(byte[] b,
int off,
int len)
throws java.io.IOException
-1 to indicate that the stream is closed.read in class java.io.InputStreamb - ignored.off - ignored.len - ignored.java.io.IOExceptionCopyright © 2010 - 2025 Adobe. All Rights Reserved