public class DatabaseIO
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ROOTELEMENTNAME_DB |
Constructor and Description |
---|
DatabaseIO() |
Modifier and Type | Method and Description |
---|---|
static org.jdom.Document |
getAnEmptyDocument()
Creates an Empty Document, used when a new Database is created from the
Engine
|
org.jdom.Document |
loadFromFile(java.io.File file)
Read the data from a file in a document that gets returned
|
static int[] |
readPreview(java.io.File file)
Read the data from a file and return a preview
|
void |
writeToFile(java.io.File file,
org.jdom.Document doc)
Write the data in the passed Document into a file
|
public static final java.lang.String ROOTELEMENTNAME_DB
public org.jdom.Document loadFromFile(java.io.File file) throws java.io.IOException, org.jdom.JDOMException
file
- java.io.IOException
org.jdom.JDOMException
public void writeToFile(java.io.File file, org.jdom.Document doc) throws java.io.IOException
file
- doc
- java.io.IOException
public static org.jdom.Document getAnEmptyDocument()
public static int[] readPreview(java.io.File file) throws java.io.IOException, org.jdom.JDOMException
file
- java.io.IOException
org.jdom.JDOMException