gnu.mail.util
Class MailboxURLConnection
URLConnection
gnu.mail.util.MailboxURLConnection
public class MailboxURLConnection
extends URLConnection
A URLConnection that can be used to access mailboxes using the JavaMail
API.
folder
protected Folder folder
The mail folder.
headers
protected Map headers
The headers to return.
message
protected Message message
The mail message, if the URL represents a message.
store
protected Store store
The mail store.
MailboxURLConnection
public MailboxURLConnection(URL url)
Constructs a new mailbox URL connection using the specified URL.
url
- the URL representing the mailbox to connect to
asURLName
protected static URLName asURLName(URL url)
Converts a URL into a URLName.
connect
public void connect()
throws IOException
Connects to the mailbox.
getContent
public Object getContent()
throws IOException
getHeaderField
public String getHeaderField(String name)
getHeaderField
public String getHeaderField(int index)
getHeaderFieldKey
public String getHeaderFieldKey(int index)
getHeaderFields
public Map getHeaderFields()
getInputStream
public InputStream getInputStream()
throws IOException