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, toString
public java.lang.String getName()
alt.test
.public java.lang.String getFullName()
Folder
This method can be invoked on a closed folder.
getFullName
in class Folder
getName()
public Folder getParent() throws MessagingException
getParent
in class Folder
MessagingException
public int getType() throws MessagingException
getType
in class Folder
MessagingException
public boolean isOpen()
Folder
public int getMode()
public Flags getPermanentFlags()
getPermanentFlags
in class Folder
public void open(int mode) throws MessagingException
open
in class Folder
mode
- open the Folder READ_ONLY or READ_WRITEFolderNotFoundException
- if this folder does not existMessagingException
public void close(boolean expunge) throws MessagingException
close
in class Folder
expunge
- if true, expunge all deleted messagesMessagingException
public boolean exists() throws MessagingException
exists
in class Folder
MessagingException
public boolean hasNewMessages() throws MessagingException
hasNewMessages
in class Folder
MessagingException
public int getMessageCount() throws MessagingException
getMessageCount
in class Folder
MessagingException
public Message getMessage(int msgnum) throws MessagingException
getMessage
in class Folder
msgnum
- the message numberMessageRemovedException
- often ;-)FolderNotFoundException
- if this folder does not existMessagingException
public Message[] getMessages() throws MessagingException
getMessages
in class Folder
FolderNotFoundException
- if this folder does not existMessagingException
public void fetch(Message[] msgs, FetchProfile fp) throws MessagingException
fetch
in class Folder
msgs
- the messages to fetch the items forfp
- the fetch profileMessagingException
public boolean isSubscribed()
isSubscribed
in class Folder
public void setSubscribed(boolean flag) throws MessagingException
setSubscribed
in class Folder
MessagingException
public Folder getFolder(java.lang.String name) throws MessagingException
getFolder
in class Folder
name
- the name of the folderMessagingException
public Folder[] list(java.lang.String pattern) throws MessagingException
list
in class Folder
pattern
- the match patternMessagingException
public Folder[] listSubscribed(java.lang.String pattern) throws MessagingException
listSubscribed
in class Folder
pattern
- the match patternMessagingException
public char getSeparator() throws MessagingException
getSeparator
in class Folder
MessagingException
public boolean create(int type) throws MessagingException
create
in class Folder
type
- the desired type of the folderMessagingException
public boolean delete(boolean recurse) throws MessagingException
delete
in class Folder
recurse
- delete any subfoldersFolderNotFoundException
- if this folder does not existMessagingException
public boolean renameTo(Folder folder) throws MessagingException
renameTo
in class Folder
folder
- a folder representing the new name for this folderFolderNotFoundException
- if this folder does not existMessagingException
public void appendMessages(Message[] messages) throws MessagingException
appendMessages
in class Folder
messages
- array of messages to be appendedFolderNotFoundException
- if this folder does not existMessagingException
- if the append operation failedpublic Message[] expunge() throws MessagingException
expunge
in class Folder
FolderNotFoundException
- if this folder does not existMessagingException