
| Modifier and Type | Field and Description |
|---|---|
private byte[] |
buffer |
private static int |
BUFFER_SIZE |
private Consumer<IOException> |
ifFails |
private InputStream |
in |
private int |
index |
private boolean |
isClosed |
private int |
read |
| Modifier | Constructor and Description |
|---|---|
|
InputStreamIterator(File in,
Consumer<IOException> ifFails) |
protected |
InputStreamIterator(InputStream in,
Consumer<IOException> ifFails) |
|
InputStreamIterator(Path in,
Consumer<IOException> ifFails) |
|
InputStreamIterator(URL in,
Consumer<IOException> ifFails) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasNext() |
Byte |
next() |
private void |
readNext() |
private static InputStream |
silenceException(Path p) |
private static InputStream |
silenceException(URL in) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemaining, removeprivate static final int BUFFER_SIZE
private final InputStream in
private final byte[] buffer
private int read
private int index
private boolean isClosed
private final Consumer<IOException> ifFails
protected InputStreamIterator(InputStream in, Consumer<IOException> ifFails)
in - the InputStream to wrapifFails - IOException handlerpublic InputStreamIterator(Path in, Consumer<IOException> ifFails)
in - an InputStream will be created from the provided PathifFails - IOException handlerpublic InputStreamIterator(URL in, Consumer<IOException> ifFails)
in - an InputStream will be created from the provided URLifFails - IOException handlerpublic InputStreamIterator(File in, Consumer<IOException> ifFails)
in - an InputStream will be created from the provided URLifFails - IOException handlerprivate static InputStream silenceException(Path p)
private static InputStream silenceException(URL in)
private void readNext()