public class POP3Folder
extends Folder
Modifier and Type | Method and Description |
---|---|
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 |
getSize()
Return the size of this folder, as was returned by the POP3 STAT
command when this folder was opened.
|
int[] |
getSizes()
Return the sizes of all messages in this folder, as returned
by the POP3 LIST command.
|
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. |
java.io.InputStream |
listCommand()
Return the raw results of the POP3 LIST command with no arguments.
|
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. |
public java.lang.String getName()
public java.lang.String getFullName()
public Folder getParent()
public boolean exists()
public Folder[] list(java.lang.String pattern) throws MessagingException
MessagingException
because no POP3 folders
can contain subfolders.MessagingException
- alwayspublic char getSeparator()
public int getType()
public boolean create(int type) throws MessagingException
false
; the POP3 protocol doesn't
support creating folders.MessagingException
public boolean hasNewMessages() throws MessagingException
false
; the POP3 protocol provides
no way to determine when a new message arrives.MessagingException
public Folder getFolder(java.lang.String name) throws MessagingException
MessagingException
because no POP3 folders
can contain subfolders.MessagingException
- alwayspublic boolean delete(boolean recurse) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't allow the INBOX to
be deleted.MethodNotSupportedException
- alwaysMessagingException
public boolean renameTo(Folder f) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support multiple folders.MethodNotSupportedException
- alwaysMessagingException
public void open(int mode) throws MessagingException
FolderNotFoundException
unless this
folder is named "INBOX".FolderNotFoundException
- if not INBOXAuthenticationException
- authentication failuresMessagingException
- other open failurespublic void close(boolean expunge) throws MessagingException
MessagingException
public boolean isOpen()
public Flags getPermanentFlags()
Flags
object because
the POP3 protocol doesn't support any permanent flags.public int getMessageCount() throws MessagingException
MessagingException
public Message getMessage(int msgno) throws MessagingException
MessagingException
public void appendMessages(Message[] msgs) throws MessagingException
MethodNotSupportedException
because the POP3 protocol doesn't support appending messages.MethodNotSupportedException
- alwaysMessagingException
public 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.MethodNotSupportedException
- alwaysMessagingException
public 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.MessagingException
public java.lang.String getUID(Message msg) throws MessagingException
MessagingException
public int getSize() throws MessagingException
java.lang.IllegalStateException
- if the folder isn't openMessagingException
public int[] getSizes() throws MessagingException
java.lang.IllegalStateException
- if the folder isn't openMessagingException
public java.io.InputStream listCommand() throws MessagingException, java.io.IOException
java.lang.IllegalStateException
- if the folder isn't openMessagingException
java.io.IOException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"