public class InputStreamByteIterator extends java.lang.Object implements ByteIterator
InputStream to the ByteIterator interface.| Modifier and Type | Field and Description |
|---|---|
private int |
next |
private boolean |
nextAvailable |
private java.io.InputStream |
stream |
| Constructor and Description |
|---|
InputStreamByteIterator(java.io.InputStream in) |
| Modifier and Type | Method and Description |
|---|---|
static ByteIterator |
adapt(java.io.InputStream in) |
private void |
ensureNextAvailable() |
boolean |
hasNext()
Returns
true iff I have more elements. |
byte |
next()
Returns the next element in me.
|
private void |
readNext() |
void |
remove()
Not supported.
|
private java.io.InputStream stream
private boolean nextAvailable
private int next
public boolean hasNext()
ByteIteratortrue iff I have more elements.
(In other words, returns true iff
a subsequent call to next will return
an element rather than throwing an exception.)hasNext in interface ByteIteratortrue iff I have more elementspublic byte next()
ByteIteratornext in interface ByteIteratorpublic void remove()
throws java.lang.UnsupportedOperationException
remove in interface ByteIteratorjava.lang.UnsupportedOperationExceptionpublic static ByteIterator adapt(java.io.InputStream in)
private void ensureNextAvailable()
private void readNext()
Copyright (c) 2002-2003 - Apache Software Foundation