|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.mail.Folder
gnu.mail.providers.nntp.NNTPFolder
public final class NNTPFolder
A JavaMail folder delegate for an NNTP newsgroup.
| Field Summary |
|---|
| Fields inherited from class javax.mail.Folder |
|---|
HOLDS_FOLDERS, HOLDS_MESSAGES, mode, READ_ONLY, READ_WRITE, store |
| Method Summary | |
|---|---|
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(String name)
This folder type does not contain other folders. |
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. |
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(String pattern)
This folder type does not contain other folders. |
Folder[] |
listSubscribed(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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public String getName()
alt.test.
getName in class Folderpublic String getFullName()
FolderThis method can be invoked on a closed folder.
getFullName in class FoldergetName()
public Folder getParent()
throws MessagingException
getParent in class FolderMessagingException
public int getType()
throws MessagingException
getType in class FolderMessagingExceptionpublic boolean isOpen()
Folder
isOpen in class Folderpublic int getMode()
getMode in class Folderpublic Flags getPermanentFlags()
getPermanentFlags in class Folder
public void open(int mode)
throws MessagingException
open in class Foldermode - open the Folder READ_ONLY or READ_WRITE
FolderNotFoundException - if this folder does not exist
MessagingException
public void close(boolean expunge)
throws MessagingException
close in class Folderexpunge - if true, expunge all deleted messages
MessagingException
public boolean exists()
throws MessagingException
exists in class FolderMessagingException
public boolean hasNewMessages()
throws MessagingException
hasNewMessages in class FolderMessagingException
public int getMessageCount()
throws MessagingException
getMessageCount in class FolderMessagingException
public Message getMessage(int msgnum)
throws MessagingException
getMessage in class Foldermsgnum - the message number
MessageRemovedException - often ;-)
FolderNotFoundException - if this folder does not exist
MessagingException
public Message[] getMessages()
throws MessagingException
getMessages in class FolderFolderNotFoundException - if this folder does not exist
MessagingException
public void fetch(Message[] msgs,
FetchProfile fp)
throws MessagingException
fetch in class Foldermsgs - the messages to fetch the items forfp - the fetch profile
MessagingExceptionpublic boolean isSubscribed()
isSubscribed in class Folder
public void setSubscribed(boolean flag)
throws MessagingException
setSubscribed in class FolderMessagingException
public Folder getFolder(String name)
throws MessagingException
getFolder in class Foldername - the name of the folder
MessagingException
public Folder[] list(String pattern)
throws MessagingException
list in class Folderpattern - the match pattern
MessagingException
public Folder[] listSubscribed(String pattern)
throws MessagingException
listSubscribed in class Folderpattern - the match pattern
MessagingException
public char getSeparator()
throws MessagingException
getSeparator in class FolderMessagingException
public boolean create(int type)
throws MessagingException
create in class Foldertype - the desired type of the folder
MessagingException
public boolean delete(boolean recurse)
throws MessagingException
delete in class Folderrecurse - delete any subfolders
FolderNotFoundException - if this folder does not exist
MessagingException
public boolean renameTo(Folder folder)
throws MessagingException
renameTo in class Folderfolder - a folder representing the new name for this folder
FolderNotFoundException - if this folder does not exist
MessagingException
public void appendMessages(Message[] messages)
throws MessagingException
appendMessages in class Foldermessages - array of messages to be appended
FolderNotFoundException - if this folder does not exist
MessagingException - if the append operation failed
public Message[] expunge()
throws MessagingException
expunge in class FolderFolderNotFoundException - if this folder does not exist
MessagingException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||