Package org.gedcomx.util
Class JsonRecordSetWriter
java.lang.Object
org.gedcomx.util.JsonRecordSetWriter
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionJsonRecordSetWriter(OutputStream outputStream, Gedcomx metadata) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Finish writing the file, including metadata (if set), and the closing tag.longvoidwriteRecord(Gedcomx record)
-
Field Details
-
ID_STR
- See Also:
-
METADATA_STR
- See Also:
-
RECORDS_STR
- See Also:
-
-
Constructor Details
-
JsonRecordSetWriter
Constructor. Prepares to write GedcomX document records to the given output stream (which may well be a GZIPOutputStream), so that only one such document needs to be fully instantiated in memory at once.- Parameters:
outputStream- - OutputStream to write the Gedcomx document to.metadata- - The metadata associated with this RecordSet. It will be written to the stream first.
-
-
Method Details
-
writeRecord
- Throws:
IOException
-
close
Finish writing the file, including metadata (if set), and the closing tag. Closes the writers and output stream.- Throws:
IOException- from stream
-
getNumOfRecords
public long getNumOfRecords()
-