public final class MultiInputCloseableIterator<T,CI extends Iterator<T> & Closeable> extends AbstractIterator<T> implements Closeable
InputStream sources.| Constructor and Description |
|---|
MultiInputCloseableIterator(Iterable<Supplier<InputStream>> inputs,
Function<InputStream,CI> iterateInputStream)
Construct.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected T |
computeNext() |
static Function<InputStream,CloseableLineIterator> |
iterateLines()
Iterate lines of an
InputStream. |
static Function<InputStream,StructureRecordIterator> |
iterateStructureRecords(String opts)
Create
StructureRecordIterator form an InputStream. |
endOfData, hasNext, next, peekremoveclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic MultiInputCloseableIterator(Iterable<Supplier<InputStream>> inputs, Function<InputStream,CI> iterateInputStream)
InputStreams is done only on the first read after closing the previous ones.inputs - Inputs.iterateInputStream - Factory for create a Closeable Iterator for an InputStreampublic static Function<InputStream,CloseableLineIterator> iterateLines()
InputStream.public static Function<InputStream,StructureRecordIterator> iterateStructureRecords(String opts)
StructureRecordIterator form an InputStream.opts - Options to pass to the underlying MFileFormatUtil#createRecordReader(java.io.InputStream, java.lang.String)protected T computeNext()
computeNext in class AbstractIterator<T>public void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOException