public final class NoThrowInputStream extends InputStream
IOExceptions
to our own NoThrowInputStream.HiddenException, which is a subclass of RuntimeException. This
means that the methods don't have IOException in their throws clauses.
NOTE: The name is slightly misleading in that these methods still might throw an
IOException wrapped in a HiddenException, just not an
IOException directly.
Also, it does have IOException in the throws clause of close(),
but you're not supposed to call that method.
| Modifier and Type | Class and Description |
|---|---|
static class |
NoThrowInputStream.HiddenException |
| Constructor and Description |
|---|
NoThrowInputStream(InputStream underlying) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
long |
getBytesRead() |
int |
read() |
int |
read(byte[] b) |
int |
read(byte[] b,
int off,
int len) |
available, mark, markSupported, reset, skippublic NoThrowInputStream(InputStream underlying)
public void close()
close in interface Closeableclose in interface AutoCloseableclose in class InputStreampublic int read()
read in class InputStreampublic int read(byte[] b,
int off,
int len)
read in class InputStreampublic int read(byte[] b)
read in class InputStreampublic long getBytesRead()