public class GedcomxFile extends Object
GedcomxFile class is used to read the contents of a GEDCOM X file
from any file that can be opened with java.util.jar.JarFile.| Constructor and Description |
|---|
GedcomxFile(JarFile jarFile,
Class<?>... classes)
Creates a new
GedcomxFile to read from the specified file JarFile. |
GedcomxFile(JarFile gedxFile,
GedcomxEntryDeserializer deserializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the GEDCOM X file.
|
String |
getAttribute(String name)
Get the value of the specified attribute for this GEDCOM X file.
|
Map<String,String> |
getAttributes()
Get the attributes that have been associated with this GEDCOM X file.
|
Iterable<GedcomxFileEntry> |
getEntries()
Get the entries found in this GEDCOM X file.
|
Manifest |
getManifest()
Get the manifest.
|
InputStream |
getResourceStream(GedcomxFileEntry gedxEntry)
Get the input stream of the resource in the given entry.
|
Object |
readResource(GedcomxFileEntry gedxEntry)
Unmarshal the resource contained in the given entry as an object.
|
public GedcomxFile(JarFile gedxFile, GedcomxEntryDeserializer deserializer)
public GedcomxFile(JarFile jarFile, Class<?>... classes) throws IOException
GedcomxFile to read from the specified file JarFile.jarFile - the jar file to be readclasses - the classes to use for serializationIOException - if an I/O error has occurredpublic String getAttribute(String name) throws IOException
name - The attribute name.IOException - if an I/O error has occurredpublic Map<String,String> getAttributes() throws IOException
IOException - if an I/O error has occurredpublic Iterable<GedcomxFileEntry> getEntries()
public Manifest getManifest() throws IOException
IOException - if an I/O error has occurredpublic InputStream getResourceStream(GedcomxFileEntry gedxEntry) throws IOException
gedxEntry - The entry that contains the desired resource.IOException - if an I/O error has occurredpublic Object readResource(GedcomxFileEntry gedxEntry) throws IOException
gedxEntry - The entry that contains the desired resource.IOException - If there was a problem unmarshalling the resource.public void close()
throws IOException
IOException - if an I/O error has occurredCopyright © 2024. All rights reserved.