|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.mail.Folder | +--com.sun.mail.pop3.POP3Folder
A POP3 Folder (can only be "INBOX"). See the com.sun.mail.pop3 package documentation for further information on the POP3 protocol provider.
Fields inherited from class javax.mail.Folder |
HOLDS_FOLDERS, HOLDS_MESSAGES, READ_ONLY, READ_WRITE |
Method Summary | |
void |
appendMessages(Message[] msgs)
Always throws MethodNotSupportedException
because the POP3 protocol doesn't support appending messages. |
void |
close(boolean expunge)
|
boolean |
create(int type)
Always returns false ; the POP3 protocol doesn't
support creating folders. |
boolean |
delete(boolean recurse)
Always throws MethodNotSupportedException
because the POP3 protocol doesn't allow the INBOX to
be deleted. |
boolean |
exists()
Always true for the folder "INBOX", always false for any other name. |
Message[] |
expunge()
Always throws MethodNotSupportedException
because the POP3 protocol doesn't support expunging messages
without closing the folder; call the close method
with the expunge argument set to true
instead. |
void |
fetch(Message[] msgs,
FetchProfile fp)
Prefetch information about POP3 messages. |
Folder |
getFolder(java.lang.String name)
Always throws MessagingException because no POP3 folders
can contain subfolders. |
java.lang.String |
getFullName()
|
Message |
getMessage(int msgno)
|
int |
getMessageCount()
Will not change while the folder is open because the POP3 protocol doesn't support notification of new messages arriving in open folders. |
java.lang.String |
getName()
|
Folder |
getParent()
|
Flags |
getPermanentFlags()
Always returns an empty Flags object because
the POP3 protocol doesn't support any permanent flags. |
char |
getSeparator()
Always returns a NUL character because POP3 doesn't support a hierarchy. |
int |
getType()
Always returns Folder.HOLDS_MESSAGES. |
java.lang.String |
getUID(Message msg)
Return the unique ID string for this message, or null if not available. |
boolean |
hasNewMessages()
Always returns false ; the POP3 protocol provides
no way to determine when a new message arrives. |
boolean |
isOpen()
|
Folder[] |
list(java.lang.String pattern)
Always throws MessagingException because no POP3 folders
can contain subfolders. |
void |
open(int mode)
Throws FolderNotFoundException unless this
folder is named "INBOX". |
boolean |
renameTo(Folder f)
Always throws MethodNotSupportedException
because the POP3 protocol doesn't support multiple folders. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
public java.lang.String getName()
getName
in class Folder
public java.lang.String getFullName()
getFullName
in class Folder
public Folder getParent()
getParent
in class Folder
public boolean exists()
exists
in class Folder
public Folder[] list(java.lang.String pattern) throws MessagingException
MessagingException
because no POP3 folders
can contain subfolders.list
in class Folder
MessagingException
- alwayspublic char getSeparator()
getSeparator
in class Folder
public int getType()
getType
in class Folder
public boolean create(int type) throws MessagingException
false
; the POP3 protocol doesn't
support creating folders.create
in class Folder
public boolean hasNewMessages() throws MessagingException
false
; the POP3 protocol provides
no way to determine when a new message arrives.hasNewMessages
in class Folder
public Folder getFolder(java.lang.String name) throws MessagingException
MessagingException
because no POP3 folders
can contain subfolders.getFolder
in class Folder
MessagingException
- alwayspublic boolean delete(boolean recurse) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't allow the INBOX to
be deleted.delete
in class Folder
MethodNotSupportedException
- alwayspublic boolean renameTo(Folder f) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support multiple folders.renameTo
in class Folder
MethodNotSupportedException
- alwayspublic void open(int mode) throws MessagingException
FolderNotFoundException
unless this
folder is named "INBOX".open
in class Folder
FolderNotFoundException
- if not INBOXAuthenticationException
- authentication failuresMessagingException
- other open failurespublic void close(boolean expunge) throws MessagingException
close
in class Folder
public boolean isOpen()
isOpen
in class Folder
public Flags getPermanentFlags()
Flags
object because
the POP3 protocol doesn't support any permanent flags.getPermanentFlags
in class Folder
public int getMessageCount() throws MessagingException
getMessageCount
in class Folder
public Message getMessage(int msgno) throws MessagingException
getMessage
in class Folder
public void appendMessages(Message[] msgs) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support appending messages.appendMessages
in class Folder
MethodNotSupportedException
- alwayspublic Message[] expunge() throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support expunging messages
without closing the folder; call the close
method
with the expunge
argument set to true
instead.expunge
in class Folder
MethodNotSupportedException
- alwayspublic void fetch(Message[] msgs, FetchProfile fp) throws MessagingException
UIDFolder.FetchProfileItem.UID
,
POP3 UIDs for all messages in the folder are fetched using the POP3
UIDL command.
If the FetchProfile contains FetchProfile.Item.ENVELOPE
,
the headers and size of all messages are fetched using the POP3 TOP
and LIST commands.fetch
in class Folder
public java.lang.String getUID(Message msg) throws MessagingException
MessagingException
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |