public class ClosedReader
extends java.io.Reader
IOUtils.EOF to all attempts to read something from it.
Typically uses of this class include testing for corner cases in methods that accept readers and acting as a sentinel
value instead of a null reader.
| Modifier and Type | Field and Description |
|---|---|
static ClosedReader |
CLOSED_READER
Deprecated.
|
static ClosedReader |
INSTANCE
The singleton instance.
|
| Constructor and Description |
|---|
ClosedReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read(char[] cbuf,
int off,
int len)
Returns -1 to indicate that the stream is closed.
|
public static final ClosedReader INSTANCE
@Deprecated public static final ClosedReader CLOSED_READER
INSTANCE.public void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.Readerjava.io.IOExceptionpublic int read(char[] cbuf,
int off,
int len)
read in class java.io.Readercbuf - ignoredoff - ignoredlen - ignoredCopyright © 2010 - 2023 Adobe. All Rights Reserved