Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
javax.mail.Folder
gnu.mail.providers.nntp.NNTPFolder
public final class NNTPFolder
extends Folder
Field Summary |
Fields inherited from class javax.mail.Folder | |
HOLDS_FOLDERS , HOLDS_MESSAGES , READ_ONLY , READ_WRITE , mode , store |
Method Summary | |
void |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
Message[] |
|
void |
|
Folder |
|
String | |
Message |
|
int |
|
Message[] |
|
int |
|
String |
|
Folder |
|
Flags |
|
char |
|
int |
|
boolean |
|
boolean |
|
boolean |
|
Folder[] |
|
Folder[] |
|
void |
|
boolean | |
void |
|
public void appendMessages(Message[] messages) throws MessagingException
NNTP servers are read-only.
- Overrides:
- appendMessages in interface Folder
public void close(boolean expunge) throws MessagingException
This method has no particular meaning in NNTP.
public boolean exists() throws MessagingException
Indicates whether the newsgroup is present on the server.
public Folder getFolder(String name) throws MessagingException
This folder type does not contain other folders.
public Message getMessage(int msgnum) throws MessagingException
Returns the article corresponding to the specified article number.
- Overrides:
- getMessage in interface Folder
public int getMessageCount() throws MessagingException
Returns the number of articles in this newsgroup.
- Overrides:
- getMessageCount in interface Folder
public Message[] getMessages() throws MessagingException
Returns all articles in this group. This tries XHDR first to retrieve Message-IDs for the articles. If this fails we fall back to statting each article.
- Overrides:
- getMessages in interface Folder
public int getMode()
This folder type is always read-only.
public String getName()
Returns the name of the newsgroup, e.g.alt.test
.
public Folder getParent() throws MessagingException
This implementation uses a flat namespace, so the parent of any NNTPFolder is the NNTP root folder.
public Flags getPermanentFlags()
Returns the flags supported by this folder.
- Overrides:
- getPermanentFlags in interface Folder
public char getSeparator() throws MessagingException
If we move away from a flat namespace, this might be useful.
- Overrides:
- getSeparator in interface Folder
public int getType() throws MessagingException
Returns the type of this folder. This folder type only holds messages.
public boolean hasNewMessages() throws MessagingException
Indicates whether there are new articles in this newsgroup.
- Overrides:
- hasNewMessages in interface Folder
public boolean isSubscribed()
Indicates if the newsgroup is subscribed. This uses the newsrc mechanism associated with this folder's store.
- Overrides:
- isSubscribed in interface Folder
public Folder[] list(String pattern) throws MessagingException
This folder type does not contain other folders.
public Folder[] listSubscribed(String pattern) throws MessagingException
This folder type does not contain other folders.
- Overrides:
- listSubscribed in interface Folder
public void open(int mode) throws MessagingException
This method has no particular meaning in NNTP. However, we will use it to send a GROUP command and refresh our article stats.
public boolean renameTo(Folder folder) throws MessagingException
NNTP servers are read-only.
public void setSubscribed(boolean flag) throws MessagingException
Subscribes or unsubscribes to this newsgroup. This uses the newsrc mechanism associated with this folder's store.
- Overrides:
- setSubscribed in interface Folder