From: Stefan Bund Date: Mon, 20 Sep 2010 11:59:33 +0000 (+0200) Subject: rename reader/writer to importer/exporter X-Git-Url: http://g0dil.de/git?a=commitdiff_plain;h=047cf507ebfb3b790d824845741f169ace317b5f;p=jpim.git rename reader/writer to importer/exporter --- diff --git a/src/de/j32/pimstuff/Main.java b/src/de/j32/pimstuff/Main.java index 173df38..09da5f9 100644 --- a/src/de/j32/pimstuff/Main.java +++ b/src/de/j32/pimstuff/Main.java @@ -11,8 +11,8 @@ import java.util.Properties; import org.xml.sax.SAXException; import de.j32.avmfritz.FritzBox; -import de.j32.pimstuff.conduit.FritzAddressbookReader; -import de.j32.pimstuff.conduit.FritzAddressbookWriter; +import de.j32.pimstuff.conduit.FritzAddressbookImporter; +import de.j32.pimstuff.conduit.FritzAddressbookExporter; import de.j32.pimstuff.data.Addressbook; import de.j32.util.Util; @@ -51,11 +51,11 @@ public class Main { System.out.println("loading ..."); // Load Addressbook from FritzBox InputStream is = null; - FritzAddressbookReader reader = null; + FritzAddressbookImporter reader = null; try { ab = new Addressbook(); is = fb.exportAddressbook(); - reader = new FritzAddressbookReader(is); + reader = new FritzAddressbookImporter(is); reader.sendTo(ab); is.close(); is = null; @@ -68,11 +68,11 @@ public class Main { System.out.println("saving ..."); // Save Addressbook back to FritzBox - FritzAddressbookWriter writer = null; + FritzAddressbookExporter writer = null; OutputStream os = null; try { os = fb.importAddressbook(); - writer = new FritzAddressbookWriter(os); + writer = new FritzAddressbookExporter(os); ab.sendTo(writer); writer.close(); writer = null; diff --git a/src/de/j32/pimstuff/conduit/FritzAddressbookWriter.java b/src/de/j32/pimstuff/conduit/FritzAddressbookExporter.java similarity index 96% rename from src/de/j32/pimstuff/conduit/FritzAddressbookWriter.java rename to src/de/j32/pimstuff/conduit/FritzAddressbookExporter.java index 361caf8..0e86005 100644 --- a/src/de/j32/pimstuff/conduit/FritzAddressbookWriter.java +++ b/src/de/j32/pimstuff/conduit/FritzAddressbookExporter.java @@ -11,13 +11,13 @@ import de.j32.pimstuff.data.Entry; import de.j32.util.SimpleXmlGenerator; import de.j32.util.Util; -public class FritzAddressbookWriter +public class FritzAddressbookExporter implements Exporter { OutputStream os_; SimpleXmlGenerator gen_; - public FritzAddressbookWriter(OutputStream os) + public FritzAddressbookExporter(OutputStream os) { try { os_ = os; diff --git a/src/de/j32/pimstuff/conduit/FritzAddressbookReader.java b/src/de/j32/pimstuff/conduit/FritzAddressbookImporter.java similarity index 94% rename from src/de/j32/pimstuff/conduit/FritzAddressbookReader.java rename to src/de/j32/pimstuff/conduit/FritzAddressbookImporter.java index a00d294..6a65a88 100644 --- a/src/de/j32/pimstuff/conduit/FritzAddressbookReader.java +++ b/src/de/j32/pimstuff/conduit/FritzAddressbookImporter.java @@ -11,12 +11,12 @@ import de.j32.pimstuff.data.Entry; import de.j32.pimstuff.data.EntryConsumer; import de.j32.util.XmlUtil; -public class FritzAddressbookReader +public class FritzAddressbookImporter implements Importer { Document xml_; - public FritzAddressbookReader(InputStream is) + public FritzAddressbookImporter(InputStream is) throws SAXException, IOException { xml_ = XmlUtil.parse(is);