rename reader/writer to importer/exporter
Stefan Bund [Mon, 20 Sep 2010 11:59:33 +0000 (13:59 +0200)]
src/de/j32/pimstuff/Main.java
src/de/j32/pimstuff/conduit/FritzAddressbookExporter.java [moved from src/de/j32/pimstuff/conduit/FritzAddressbookWriter.java with 96% similarity]
src/de/j32/pimstuff/conduit/FritzAddressbookImporter.java [moved from src/de/j32/pimstuff/conduit/FritzAddressbookReader.java with 94% similarity]

index 173df38..09da5f9 100644 (file)
@@ -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;
@@ -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;
@@ -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);