org.apache.commons.collections.primitives.adapters.io

Class InputStreamByteIterator

public class InputStreamByteIterator extends Object implements ByteIterator

Adapts an InputStream to the ByteIterator interface.

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

Author: Rodney Waldhoff

Field Summary
intnext
booleannextAvailable
InputStreamstream
Constructor Summary
InputStreamByteIterator(InputStream in)
Method Summary
static ByteIteratoradapt(InputStream in)
voidensureNextAvailable()
booleanhasNext()
bytenext()
voidreadNext()
voidremove()
Not supported.

Field Detail

private int next

nextAvailable

private boolean nextAvailable

stream

private InputStream stream

Constructor Detail

InputStreamByteIterator

public InputStreamByteIterator(InputStream in)

Method Detail

adapt

public static ByteIterator adapt(InputStream in)

ensureNextAvailable

private void ensureNextAvailable()

hasNext

public boolean hasNext()

next

public byte next()

readNext

private void readNext()

remove

public void remove()
Not supported.

Throws: UnsupportedOperationException

Copyright (c) 2002-2003 - Apache Software Foundation