public class JsonRecordSetIterator extends Object implements RecordSetIterator
| Constructor and Description |
|---|
JsonRecordSetIterator(InputStream inputStream)
Constructor for a record iterator that takes an InputStream of a RecordSet file and
iterates through its record elements.
|
JsonRecordSetIterator(InputStream inputStream,
boolean isGzipped) |
JsonRecordSetIterator(String filename)
Constructor for a record iterator that takes a filename of a RecordSet file and iterates through its record elements.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the input stream and accompanying reader if they are still open.
|
String |
getId() |
Gedcomx |
getMetadata()
This should be read last as you cannot be sure of when the metadata will appear in the data stream.
|
boolean |
hasNext()
Tell whether the RecordIterator has another GedcomX record to return.
|
Gedcomx |
next()
Get the next Gedcomx Record from the RecordSet.
|
void |
remove() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingpublic JsonRecordSetIterator(String filename) throws IOException
filename - - Filename to read a GedcomX RecordSet file from.IOException - If there's an I/O problem.public JsonRecordSetIterator(InputStream inputStream, boolean isGzipped) throws IOException
IOExceptionpublic JsonRecordSetIterator(InputStream inputStream) throws IOException
inputStream - - InputStream to read a GedcomX RecordSet file from.IOException - If there's an I/O problem.public boolean hasNext()
hasNext in interface Iterator<Gedcomx>hasNext in interface RecordSetIteratorpublic Gedcomx next()
RecordSetIteratornext in interface Iterator<Gedcomx>next in interface RecordSetIteratorpublic Gedcomx getMetadata()
getMetadata in interface RecordSetIteratorpublic void remove()
remove in interface Iterator<Gedcomx>remove in interface RecordSetIteratorpublic void close()
close in interface RecordSetIteratorpublic String getId() throws IOException
IOExceptionCopyright © 2016. All rights reserved.