public final class NNTPFolder extends Folder
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store| Modifier and Type | Method and Description |
|---|---|
void |
appendMessages(Message[] messages)
NNTP servers are read-only.
|
void |
close(boolean expunge)
This method has no particular meaning in NNTP.
|
boolean |
create(int type)
NNTP servers are read-only.
|
boolean |
delete(boolean recurse)
NNTP servers are read-only.
|
boolean |
exists()
Indicates whether the newsgroup is present on the server.
|
Message[] |
expunge()
NNTP servers are read-only.
|
void |
fetch(Message[] msgs,
FetchProfile fp)
Prefetch.
|
Folder |
getFolder(java.lang.String name)
This folder type does not contain other folders.
|
java.lang.String |
getFullName()
Returns the full name of this folder.
|
Message |
getMessage(int msgnum)
Returns the article corresponding to the specified article
number.
|
int |
getMessageCount()
Returns the number of articles in this newsgroup.
|
Message[] |
getMessages()
Returns all articles in this group.
|
int |
getMode()
This folder type is always read-only.
|
java.lang.String |
getName()
Returns the name of the newsgroup, e.g.
|
Folder |
getParent()
This implementation uses a flat namespace, so the parent of any
NNTPFolder is the NNTP root folder.
|
Flags |
getPermanentFlags()
Returns the flags supported by this folder.
|
char |
getSeparator()
If we move away from a flat namespace, this might be useful.
|
int |
getType()
Returns the type of this folder.
|
boolean |
hasNewMessages()
Indicates whether there are new articles in this newsgroup.
|
boolean |
isOpen()
Indicates whether this folder is open.
|
boolean |
isSubscribed()
Indicates if the newsgroup is subscribed.
|
Folder[] |
list(java.lang.String pattern)
This folder type does not contain other folders.
|
Folder[] |
listSubscribed(java.lang.String pattern)
This folder type does not contain other folders.
|
void |
open(int mode)
This method has no particular meaning in NNTP.
|
boolean |
renameTo(Folder folder)
NNTP servers are read-only.
|
void |
setSubscribed(boolean flag)
Subscribes or unsubscribes to this newsgroup.
|
addConnectionListener, addFolderListener, addMessageChangedListener, addMessageCountListener, copyMessages, getDeletedMessageCount, getMessages, getMessages, getNewMessageCount, getStore, getUnreadMessageCount, getURLName, list, listSubscribed, notifyConnectionListeners, notifyFolderListeners, notifyFolderRenamedListeners, notifyMessageAddedListeners, notifyMessageChangedListeners, notifyMessageRemovedListeners, removeConnectionListener, removeFolderListener, removeMessageChangedListener, removeMessageCountListener, search, search, setFlags, setFlags, setFlags, toStringpublic java.lang.String getName()
alt.test.public java.lang.String getFullName()
FolderThis method can be invoked on a closed folder.
getFullName in class FoldergetName()public Folder getParent() throws MessagingException
getParent in class FolderMessagingExceptionpublic int getType()
throws MessagingException
getType in class FolderMessagingExceptionpublic boolean isOpen()
Folderpublic int getMode()
public Flags getPermanentFlags()
getPermanentFlags in class Folderpublic void open(int mode)
throws MessagingException
open in class Foldermode - open the Folder READ_ONLY or READ_WRITEFolderNotFoundException - if this folder does not existMessagingExceptionpublic void close(boolean expunge)
throws MessagingException
close in class Folderexpunge - if true, expunge all deleted messagesMessagingExceptionpublic boolean exists()
throws MessagingException
exists in class FolderMessagingExceptionpublic boolean hasNewMessages()
throws MessagingException
hasNewMessages in class FolderMessagingExceptionpublic int getMessageCount()
throws MessagingException
getMessageCount in class FolderMessagingExceptionpublic Message getMessage(int msgnum) throws MessagingException
getMessage in class Foldermsgnum - the message numberMessageRemovedException - often ;-)FolderNotFoundException - if this folder does not existMessagingExceptionpublic Message[] getMessages() throws MessagingException
getMessages in class FolderFolderNotFoundException - if this folder does not existMessagingExceptionpublic void fetch(Message[] msgs, FetchProfile fp) throws MessagingException
fetch in class Foldermsgs - the messages to fetch the items forfp - the fetch profileMessagingExceptionpublic boolean isSubscribed()
isSubscribed in class Folderpublic void setSubscribed(boolean flag)
throws MessagingException
setSubscribed in class FolderMessagingExceptionpublic Folder getFolder(java.lang.String name) throws MessagingException
getFolder in class Foldername - the name of the folderMessagingExceptionpublic Folder[] list(java.lang.String pattern) throws MessagingException
list in class Folderpattern - the match patternMessagingExceptionpublic Folder[] listSubscribed(java.lang.String pattern) throws MessagingException
listSubscribed in class Folderpattern - the match patternMessagingExceptionpublic char getSeparator()
throws MessagingException
getSeparator in class FolderMessagingExceptionpublic boolean create(int type)
throws MessagingException
create in class Foldertype - the desired type of the folderMessagingExceptionpublic boolean delete(boolean recurse)
throws MessagingException
delete in class Folderrecurse - delete any subfoldersFolderNotFoundException - if this folder does not existMessagingExceptionpublic boolean renameTo(Folder folder) throws MessagingException
renameTo in class Folderfolder - a folder representing the new name for this folderFolderNotFoundException - if this folder does not existMessagingExceptionpublic void appendMessages(Message[] messages) throws MessagingException
appendMessages in class Foldermessages - array of messages to be appendedFolderNotFoundException - if this folder does not existMessagingException - if the append operation failedpublic Message[] expunge() throws MessagingException
expunge in class FolderFolderNotFoundException - if this folder does not existMessagingException