diff --git a/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java b/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java index cf5493f..de0cdd6 100644 --- a/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java +++ b/src/fr/devinsy/sikevadb/core/XMLSikevaDB.java @@ -19,6 +19,8 @@ package fr.devinsy.sikevadb.core; import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; @@ -45,6 +47,23 @@ public class XMLSikevaDB { private static final Logger logger = LoggerFactory.getLogger(XMLSikevaDB.class); + /** + * Export in XML a database in a file. + * + * @param out + * the out + * @param source + * the source + * @throws SikevaDBException + * the SikevaDB exception + * @throws FileNotFoundException + * the file not found exception + */ + public static void export(final File out, final SikevaDB source) throws SikevaDBException, FileNotFoundException + { + export(new FileOutputStream(out), source, out.getName()); + } + /** * Export. * @@ -53,7 +72,7 @@ public class XMLSikevaDB * @param source * the source * @throws SikevaDBException - * the sikeva DB exception + * the SikevaDB exception */ public static void export(final OutputStream out, final SikevaDB source) throws SikevaDBException { @@ -74,7 +93,7 @@ public class XMLSikevaDB * @param fileName * the file name * @throws SikevaDBException - * the sikeva DB exception + * the SikevaDB exception */ public static void export(final OutputStream out, final SikevaDB source, final String fileName) throws SikevaDBException { @@ -138,6 +157,8 @@ public class XMLSikevaDB */ public static void importData(final SikevaDB database, final File file) { + // TODO + // XMLReader in = null; // try { // in = new XMLZipReader(file);