|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--grendel.storage.NewsRC
This class represents a newsrc-format disk file, and the newsgroup descriptions within it.
Field Summary | |
protected boolean |
dirty
|
protected java.io.File |
file
|
protected long |
file_date
|
protected long |
file_size
|
protected java.util.Vector |
lines
|
protected ByteBuf |
options_lines
|
Method Summary | |
java.util.Enumeration |
elements()
|
java.io.File |
file()
Returns the file associated with this newsrc object. |
grendel.storage.NewsRCLine |
getNewsgroup(java.lang.String group_name)
Returns a NewsRCLine describing the named newsgroup. |
static void |
main(java.lang.String[] argv)
|
protected grendel.storage.NewsRCLine |
makeNewsRCLine(ByteBuf line_buf)
Parses the given line and creates a NewsRCLine object representing it. |
void |
markDirty()
Call this to indicate that the file needs to be flushed to disk. |
protected void |
parse_file(java.io.FileInputStream in)
|
protected void |
save_internal()
|
void |
save()
Writes the file associated with this NewsRC object, if there have been any changes to it. |
protected java.io.File |
tempFileName()
Returns the name of a non-existent file that can be used as a temporary file while writing this newsrc. |
protected void |
verifyFileDate(boolean was_dirty)
Compare the current date/size of the disk file with the date/size at the time we read it, and if the disk version has changed, do something sensible. |
void |
write(java.io.OutputStream stream)
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected java.io.File file
protected long file_date
protected long file_size
protected ByteBuf options_lines
protected java.util.Vector lines
protected boolean dirty
Method Detail |
public java.io.File file()
protected void parse_file(java.io.FileInputStream in) throws java.io.IOException
public void markDirty()
protected grendel.storage.NewsRCLine makeNewsRCLine(ByteBuf line_buf)
public java.util.Enumeration elements()
public grendel.storage.NewsRCLine getNewsgroup(java.lang.String group_name)
public void write(java.io.OutputStream stream) throws java.io.IOException
protected java.io.File tempFileName()
On all systems, the summary file resides in the same directory as the folder file, and has the same "base" name.
On Unix, the summary file for .newsrc-HOSTNAME would be .newsrc-HOSTNAME.ns_tmp.
On Windows and Mac, the summary file for news-HOSTNAME.rc would be news-HOSTNAME.TMP.
public void save() throws java.io.IOException
protected void save_internal() throws java.io.IOException
protected void verifyFileDate(boolean was_dirty)
public static void main(java.lang.String[] argv)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |