|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gedcomx.util.JsonRecordSetIterator
public class JsonRecordSetIterator
Class for iterating through the 'record' elements (GedcomX documents) in a RecordSet one at a time from a stream (e.g., a gzipped byte array) without having to inflate all the records at once. This reads JSON-formatted Records. User: Brent Hale Date: 6/3/2015
| Constructor Summary | |
|---|---|
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. |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JsonRecordSetIterator(String filename)
throws IOException
filename - - Filename to read a GedcomX RecordSet file from.
IOException
public JsonRecordSetIterator(InputStream inputStream,
boolean isGzipped)
throws IOException
IOException
public JsonRecordSetIterator(InputStream inputStream)
throws IOException
inputStream - - InputStream to read a GedcomX RecordSet file from.
IOException| Method Detail |
|---|
public boolean hasNext()
hasNext in interface Iterator<Gedcomx>hasNext in interface RecordSetIteratorpublic Gedcomx next()
RecordSetIterator
next 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 RecordSetIterator
public String getId()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||