net.i2p.addressbook
Class SubscriptionList

java.lang.Object
  extended by net.i2p.addressbook.SubscriptionList

public class SubscriptionList
extends java.lang.Object

A list of Subscriptions loaded from a file.

Author:
Ragnarok

Constructor Summary
SubscriptionList(java.io.File locationsFile, java.io.File etagsFile, java.io.File lastModifiedFile, java.util.List defaultSubs, java.lang.String proxyHost, int proxyPort)
          Construct a SubscriptionList using the urls from locationsFile and, if available, the etags and last-modified headers loaded from etagsFile and lastModifiedFile.
 
Method Summary
 SubscriptionIterator iterator()
          Return an iterator over the AddressBooks represented by the Subscriptions in this SubscriptionList.
 void write()
          Write the etag and last-modified headers for each Subscription to files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionList

public SubscriptionList(java.io.File locationsFile,
                        java.io.File etagsFile,
                        java.io.File lastModifiedFile,
                        java.util.List defaultSubs,
                        java.lang.String proxyHost,
                        int proxyPort)
Construct a SubscriptionList using the urls from locationsFile and, if available, the etags and last-modified headers loaded from etagsFile and lastModifiedFile.

Parameters:
locationsFile - A file containing one url on each line.
etagsFile - A file containg the etag headers used for conditional GET. The file is in the format "url=etag".
lastModifiedFile - A file containg the last-modified headers used for conditional GET. The file is in the format "url=leastmodified".
defaultSubs - default subscription file
proxyHost - proxy hostname
proxyPort - proxy port number
Method Detail

iterator

public SubscriptionIterator iterator()
Return an iterator over the AddressBooks represented by the Subscriptions in this SubscriptionList.

Returns:
A SubscriptionIterator.

write

public void write()
Write the etag and last-modified headers for each Subscription to files.