gnu.inet.nntp
Class FileNewsrc

java.lang.Object
  extended by gnu.inet.nntp.FileNewsrc
All Implemented Interfaces:
Newsrc

public class FileNewsrc
extends java.lang.Object
implements Newsrc

A .newsrc configuration on a filesystem.

Author:
Chris Burdess

Field Summary
protected  boolean debug
           
protected  boolean dirty
           
protected  java.io.File file
           
protected  java.util.List groups
           
protected  java.util.Map lines
           
protected  java.util.List subs
           
 
Constructor Summary
FileNewsrc(java.io.File file, boolean debug)
          Constructor.
 
Method Summary
 void close()
          Closes the configuration, potentially saving any changes.
 boolean isSeen(java.lang.String newsgroup, int article)
          Indicates whether an article is marked as seen in the specified newsgroup.
 boolean isSubscribed(java.lang.String newsgroup)
          Indicates whether a newsgroup is subscribed in this newsrc.
 java.util.Iterator list()
          Returns an iterator over the names of the currently subscribed newsgroups.
 void setSeen(java.lang.String newsgroup, int article, boolean flag)
          Sets whether an article is marked as seen in the specified newsgroup.
 void setSubscribed(java.lang.String newsgroup, boolean flag)
          Sets whether a newsgroup is subscribed in this newsrc.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

file

protected java.io.File file

subs

protected java.util.List subs

groups

protected java.util.List groups

lines

protected java.util.Map lines

dirty

protected boolean dirty

debug

protected boolean debug
Constructor Detail

FileNewsrc

public FileNewsrc(java.io.File file,
                  boolean debug)
Constructor.

Parameters:
file - the disk file
debug - for debugging information on stderr
Method Detail

close

public void close()
Description copied from interface: Newsrc
Closes the configuration, potentially saving any changes.

Specified by:
close in interface Newsrc

list

public java.util.Iterator list()
Returns an iterator over the names of the currently subscribed newsgroups.

Specified by:
list in interface Newsrc

isSubscribed

public boolean isSubscribed(java.lang.String newsgroup)
Description copied from interface: Newsrc
Indicates whether a newsgroup is subscribed in this newsrc.

Specified by:
isSubscribed in interface Newsrc

setSubscribed

public void setSubscribed(java.lang.String newsgroup,
                          boolean flag)
Description copied from interface: Newsrc
Sets whether a newsgroup is subscribed in this newsrc.

Specified by:
setSubscribed in interface Newsrc

isSeen

public boolean isSeen(java.lang.String newsgroup,
                      int article)
Description copied from interface: Newsrc
Indicates whether an article is marked as seen in the specified newsgroup.

Specified by:
isSeen in interface Newsrc

setSeen

public void setSeen(java.lang.String newsgroup,
                    int article,
                    boolean flag)
Description copied from interface: Newsrc
Sets whether an article is marked as seen in the specified newsgroup.

Specified by:
setSeen in interface Newsrc


© Copyright 2003 The Free Software Foundation, all rights reserved