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;
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;
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;
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;
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);