Class ManagedReader<T>
java.lang.Object
org.ojalgo.netio.ManagedReader<T>
- All Implemented Interfaces:
Closeable, AutoCloseable, Iterable<T>, FromFileReader<T>
-
Nested Class Summary
Nested classes/interfaces inherited from interface FromFileReader
FromFileReader.Builder<F> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intdrainTo(Collection<? super T> container, int maxElements) Behaves similar toBlockingQueue.drainTo(Collection, int)except that returning 0 means there are no more items to read.read()Returning null indicates that there are no more items to read.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface FromFileReader
forEachInBacthes, iterator, map, streamMethods inherited from interface Iterable
forEach, spliterator
-
Field Details
-
myManager
-
myReader
-
-
Constructor Details
-
ManagedReader
ManagedReader(Throughput manager, FromFileReader<T> reader)
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceFromFileReader<T>- Throws:
IOException
-
drainTo
Description copied from interface:FromFileReaderBehaves similar toBlockingQueue.drainTo(Collection, int)except that returning 0 means there are no more items to read.- Specified by:
drainToin interfaceFromFileReader<T>
-
read
Description copied from interface:FromFileReaderReturning null indicates that there are no more items to read. That's the same behaviour asBufferedReader.readLine(). All implementations must return null precisely once.- Specified by:
readin interfaceFromFileReader<T>
-