org.apache.commons.collections.primitives.adapters.io
public class: ByteIteratorInputStream [javadoc |
source]
java.lang.Object
java.io.InputStream
org.apache.commons.collections.primitives.adapters.io.ByteIteratorInputStream
All Implemented Interfaces:
Closeable
Adapts an
ByteIterator to the
InputStream interface.
- version:
$ - Revision: 1.1 $ $Date: 2003/10/13 22:46:58 $
- author:
Rodney - Waldhoff
| Method from org.apache.commons.collections.primitives.adapters.io.ByteIteratorInputStream Summary: |
|---|
|
adapt, read |
| Method from org.apache.commons.collections.primitives.adapters.io.ByteIteratorInputStream Detail: |
public static InputStream adapt(ByteIterator in) {
return null == in ? null : new ByteIteratorInputStream(in);
}
|
public int read() {
if(iterator.hasNext()) {
return (0xFF & iterator.next());
} else {
return -1;
}
}
|