public class RecordSetWriter extends Object
| Modifier | Constructor and Description |
|---|---|
|
RecordSetWriter(OutputStream outputStream)
Constructor.
|
protected |
RecordSetWriter(OutputStream outputStream,
boolean shouldFilter)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Finish writing the file, including metadata (if set), and the closing tag.
|
void |
setMetadata(Gedcomx metadata)
Set the 'metadata' document, which will be written after all of the records.
|
void |
writeRecord(Gedcomx record)
Write the given record to the underlying byte-level (and possibly GZipped) output stream.
|
public RecordSetWriter(OutputStream outputStream)
outputStream - - OutputStream to write XML to.protected RecordSetWriter(OutputStream outputStream, boolean shouldFilter)
outputStream - - OutputStream to write XML to.shouldFilter - - Flag for whether to use a CleanXMLStreamWriter to convert invalid XML characters
(such as a vertical tab) into the Unicode REPLACEMENT_CHARACTER (0xFFFD), so that
the XML will unmarshal without throwing an exception.public void writeRecord(Gedcomx record) throws JAXBException
record - - GedcomX document to add as a 'record' to the RecordSet OutputStream.JAXBException - If there's a problem with the XML.public void setMetadata(Gedcomx metadata) throws JAXBException
metadata - - GedcomX document with group-level information.JAXBException - If there's a problem with the XML.public void close()
throws IOException
IOException - If there's an I/O problem.Copyright © 2016. All rights reserved.