Package org.aksw.commons.io.input
Class IteratorOverReadableChannel<T>
java.lang.Object
com.google.common.collect.UnmodifiableIterator<T>
com.google.common.collect.AbstractIterator<T>
org.aksw.commons.io.input.IteratorOverReadableChannel<T>
- All Implemented Interfaces:
AutoCloseable,Iterator<T>,CloseableIterator<T>
public class IteratorOverReadableChannel<T>
extends com.google.common.collect.AbstractIterator<T>
implements CloseableIterator<T>
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Objectprotected intprotected intprotected intprotected ReadableChannel<T[]> -
Constructor Summary
ConstructorsConstructorDescriptionIteratorOverReadableChannel(ArrayOps<T[]> arrayOps, ReadableChannel<T[]> dataStream, int internalBufferSize) -
Method Summary
Methods inherited from class com.google.common.collect.AbstractIterator
endOfData, hasNext, next, peekMethods inherited from class com.google.common.collect.UnmodifiableIterator
removeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Field Details
-
dataStream
-
arrayOps
-
array
-
arrayLength
protected int arrayLength -
currentOffset
protected int currentOffset -
currentDataLength
protected int currentDataLength
-
-
Constructor Details
-
IteratorOverReadableChannel
public IteratorOverReadableChannel(ArrayOps<T[]> arrayOps, ReadableChannel<T[]> dataStream, int internalBufferSize) - Parameters:
arrayOps-dataStream-internalBufferSize- The number of items to read from the dataStream at once.
-
-
Method Details
-
computeNext
- Specified by:
computeNextin classcom.google.common.collect.AbstractIterator<T>
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseableIterator<T>
-