public class GedcomxOutputStream extends Object
| Constructor and Description |
|---|
GedcomxOutputStream(OutputStream gedxOutputStream,
Class<?>... classes)
Constructs a GEDCOM X output stream.
|
GedcomxOutputStream(OutputStream gedxOutputStream,
GedcomxEntrySerializer serializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(String name,
String value)
Add an attribute to the GEDCOM X output stream.
|
void |
addResource(Gedcomx resource)
Add a resource to the GEDCOM X output stream.
|
void |
addResource(Gedcomx resource,
Date lastModified)
Add a resource to the GEDCOM X output stream.
|
void |
addResource(String entryName,
Gedcomx resource,
Date lastModified)
Add a resource to the GEDCOM X output stream.
|
void |
addResource(String contentType,
String entryName,
InputStream resource,
Date lastModified,
Map<String,String> attributes)
Add a resource to the GEDCOM X output stream.
|
void |
addResource(String contentType,
String entryName,
Object resource,
Date lastModified)
Add a resource to the GEDCOM X output stream.
|
void |
addResource(String contentType,
String entryName,
Object resource,
Date lastModified,
Map<String,String> attributes)
Add a resource to the GEDCOM X output stream.
|
void |
close()
Closes the GEDCOM X output stream as well as the stream being filtered.
|
protected void |
putNextEntry(String contentType,
String entryName,
Date lastModified,
Map<String,String> attributes) |
public GedcomxOutputStream(OutputStream gedxOutputStream, GedcomxEntrySerializer serializer) throws IOException
IOExceptionpublic GedcomxOutputStream(OutputStream gedxOutputStream, Class<?>... classes) throws IOException
gedxOutputStream - an output stream to which the GEDCOM X resources will appendedclasses - classes representing resources that will be marshaled (via JAXB) into the GEDCOM X output streamIOException - if an I/O error has occurredpublic void addAttribute(String name, String value)
name - The name of the attribute.value - The value of the attribute.public void addResource(Gedcomx resource) throws IOException
resource - The resource.IOException - if an I/O error has occurredpublic void addResource(Gedcomx resource, Date lastModified) throws IOException
resource - The resource.lastModified - timestamp when the resource was last modified (can be null)IOException - if an I/O error has occurredpublic void addResource(String entryName, Gedcomx resource, Date lastModified) throws IOException
entryName - The name by which this resource shall be known within the GEDCOM X file.resource - The resource.lastModified - timestamp when the resource was last modified (can be null)IOException - if an I/O error has occurredpublic void addResource(String contentType, String entryName, Object resource, Date lastModified) throws IOException
contentType - The content type of the resource.entryName - The name by which this resource shall be known within the GEDCOM X file.resource - The resource.lastModified - timestamp when the resource was last modified (can be null)IOException - if an I/O error has occurredpublic void addResource(String contentType, String entryName, Object resource, Date lastModified, Map<String,String> attributes) throws IOException
contentType - The content type of the resource.entryName - The name by which this resource shall be known within the GEDCOM X file.resource - The resource.lastModified - timestamp when the resource was last modified (can be null)attributes - The attributes of the resource.IOException - if an I/O error has occurredpublic void addResource(String contentType, String entryName, InputStream resource, Date lastModified, Map<String,String> attributes) throws IOException
contentType - The content type of the resource.entryName - The name by which this resource shall be known within the GEDCOM X file.resource - The resource.lastModified - timestamp when the resource was last modified (can be null)attributes - The attributes of the resource.IOException - if an I/O error has occurredprotected void putNextEntry(String contentType, String entryName, Date lastModified, Map<String,String> attributes) throws IOException
IOExceptionpublic void close()
throws IOException
IOException - if an I/O error has occurredCopyright © 2024. All rights reserved.