Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.commons.collections.primitives.adapters.io
Class InputStreamByteIterator  view InputStreamByteIterator download InputStreamByteIterator.java

java.lang.Object
  extended byorg.apache.commons.collections.primitives.adapters.io.InputStreamByteIterator
All Implemented Interfaces:
org.apache.commons.collections.primitives.ByteIterator

public class InputStreamByteIterator
extends java.lang.Object
implements org.apache.commons.collections.primitives.ByteIterator

Adapts an java.io.InputStream to the org.apache.commons.collections.primitives.ByteIterator interface.

Version:
$Revision: 1.2 $ $Date: 2003/10/29 18:28:20 $

Field Summary
private  int next
           
private  boolean nextAvailable
           
private  java.io.InputStream stream
           
 
Constructor Summary
InputStreamByteIterator(java.io.InputStream in)
           
 
Method Summary
static org.apache.commons.collections.primitives.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stream

private java.io.InputStream stream

nextAvailable

private boolean nextAvailable

next

private int next
Constructor Detail

InputStreamByteIterator

public InputStreamByteIterator(java.io.InputStream in)
Method Detail

hasNext

public boolean hasNext()
Description copied from interface: org.apache.commons.collections.primitives.ByteIterator
Returns true iff I have more elements. (In other words, returns true iff a subsequent call to next 55 will return an element rather than throwing an exception.)

Specified by:
hasNext in interface org.apache.commons.collections.primitives.ByteIterator

next

public byte next()
Description copied from interface: org.apache.commons.collections.primitives.ByteIterator
Returns the next element in me.

Specified by:
next in interface org.apache.commons.collections.primitives.ByteIterator

remove

public void remove()
            throws java.lang.UnsupportedOperationException
Not supported.

Specified by:
remove in interface org.apache.commons.collections.primitives.ByteIterator

adapt

public static org.apache.commons.collections.primitives.ByteIterator adapt(java.io.InputStream in)

ensureNextAvailable

private void ensureNextAvailable()

readNext

private void readNext()