gnu.mail.util

Class MailboxURLConnection


public class MailboxURLConnection
extends URLConnection

A URLConnection that can be used to access mailboxes using the JavaMail API.

Field Summary

protected Folder
folder
The mail folder.
protected Map
headers
The headers to return.
protected Message
message
The mail message, if the URL represents a message.
protected Store
store
The mail store.

Constructor Summary

MailboxURLConnection(URL url)
Constructs a new mailbox URL connection using the specified URL.

Method Summary

protected static URLName
asURLName(URL url)
Converts a URL into a URLName.
void
connect()
Connects to the mailbox.
Object
getContent()
String
getHeaderField(String name)
String
getHeaderField(int index)
String
getHeaderFieldKey(int index)
Map
getHeaderFields()
InputStream
getInputStream()

Field Details

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.

Constructor Details

MailboxURLConnection

public MailboxURLConnection(URL url)
Constructs a new mailbox URL connection using the specified URL.

Parameters:
url - the URL representing the mailbox to connect to

Method Details

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