gnu.mail.providers.pop3

Class POP3Folder

public final class POP3Folder extends Folder

The folder class implementing the POP3 mail protocol.

Version: 1.3

Author: Chris Burdess Nic Ferrier

Constructor Summary
protected POP3Folder(Store store, int type)
Constructor.
Method Summary
voidappendMessages(Message[] messages)
You can't append messages to a POP3 folder.
voidclose(boolean expunge)
Closes this folder.
booleancreate(int i)
POP3 folders can't be created, deleted, or renamed.
booleandelete(boolean flag)
POP3 folders can't be created, deleted, or renamed.
booleanexists()
Indicates whether this folder exists.
Message[]expunge()
Expunges this folder.
voidfetch(Message[] messages, FetchProfile fp)
Fetches headers and/or content for the specified messages.
FoldergetFolder(String s)
POP3 folders can't contain subfolders.
StringgetFullName()
Returns the full name of this folder.
MessagegetMessage(int msgnum)
Returns the specified message from this folder.
intgetMessageCount()
Returns the number of messages in this folder.
StringgetName()
Returns the name of this folder.
FoldergetParent()
POP3 folders can't have parents.
FlagsgetPermanentFlags()
Returns the permanent flags for this folder.
chargetSeparator()
Returns the path separator charcter.
intgetType()
Returns the type of this folder.
StringgetUID(Message message)
Returns the unique ID for the given message, or null if not available.
booleanhasNewMessages()
Indicates whether this folder contains new messages.
booleanisOpen()
Indicates whether this folder is open.
Folder[]list()
Returns the subfolders for this folder.
Folder[]list(String pattern)
Returns the subfolders for this folder.
voidopen(int mode)
Opens this folder.
booleanrenameTo(Folder folder)
POP3 folders can't be created, deleted, or renamed.

Constructor Detail

POP3Folder

protected POP3Folder(Store store, int type)
Constructor.

Method Detail

appendMessages

public void appendMessages(Message[] messages)
You can't append messages to a POP3 folder.

close

public void close(boolean expunge)
Closes this folder.

Parameters: expunge if the folder is to be expunged before it is closed

Throws: MessagingException if a messaging error occurred

create

public boolean create(int i)
POP3 folders can't be created, deleted, or renamed.

delete

public boolean delete(boolean flag)
POP3 folders can't be created, deleted, or renamed.

exists

public boolean exists()
Indicates whether this folder exists.

Throws: MessagingException if a messaging error occurred

expunge

public Message[] expunge()
Expunges this folder. This deletes all the messages marked as deleted.

Throws: MessagingException if a messaging error occurred

fetch

public void fetch(Message[] messages, FetchProfile fp)
Fetches headers and/or content for the specified messages.

Throws: MessagingException ignore

getFolder

public Folder getFolder(String s)
POP3 folders can't contain subfolders.

getFullName

public String getFullName()
Returns the full name of this folder.

getMessage

public Message getMessage(int msgnum)
Returns the specified message from this folder.

Parameters: msgnum the message number

Throws: MessagingException if a messaging error occurred

getMessageCount

public int getMessageCount()
Returns the number of messages in this folder. This results in a STAT call to the POP3 server, so the latest count is always delivered.

Throws: MessagingException if a messaging error occurred

getName

public String getName()
Returns the name of this folder.

getParent

public Folder getParent()
POP3 folders can't have parents.

getPermanentFlags

public Flags getPermanentFlags()
Returns the permanent flags for this folder.

getSeparator

public char getSeparator()
Returns the path separator charcter.

getType

public int getType()
Returns the type of this folder.

Throws: MessagingException if a messaging error occurred

getUID

public String getUID(Message message)
Returns the unique ID for the given message, or null if not available.

Parameters: message the message

hasNewMessages

public boolean hasNewMessages()
Indicates whether this folder contains new messages.

Throws: MessagingException if a messaging error occurred

isOpen

public boolean isOpen()
Indicates whether this folder is open.

list

public Folder[] list()
Returns the subfolders for this folder.

list

public Folder[] list(String pattern)
Returns the subfolders for this folder.

open

public void open(int mode)
Opens this folder.

Throws: MessagingException if a messaging error occurred

renameTo

public boolean renameTo(Folder folder)
POP3 folders can't be created, deleted, or renamed.
© Copyright 2003, 2004 The Free Software Foundation, All rights reserved