public class MailboxURLConnection
extends java.net.URLConnection
Modifier and Type | Field and Description |
---|---|
protected Folder |
folder
The mail folder.
|
protected java.util.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 and Description |
---|
MailboxURLConnection(java.net.URL url)
Constructs a new mailbox URL connection using the specified URL.
|
Modifier and Type | Method and Description |
---|---|
protected static URLName |
asURLName(java.net.URL url)
Converts a URL into a URLName.
|
void |
connect()
Connects to the mailbox.
|
java.lang.Object |
getContent() |
java.lang.String |
getHeaderField(int index) |
java.lang.String |
getHeaderField(java.lang.String name) |
java.lang.String |
getHeaderFieldKey(int index) |
java.util.Map |
getHeaderFields() |
java.io.InputStream |
getInputStream() |
addRequestProperty, getAllowUserInteraction, getConnectTimeout, getContent, getContentEncoding, getContentLength, getContentLengthLong, getContentType, getDate, getDefaultAllowUserInteraction, getDefaultRequestProperty, getDefaultUseCaches, getDoInput, getDoOutput, getExpiration, getFileNameMap, getHeaderFieldDate, getHeaderFieldInt, getHeaderFieldLong, getIfModifiedSince, getLastModified, getOutputStream, getPermission, getReadTimeout, getRequestProperties, getRequestProperty, getURL, getUseCaches, guessContentTypeFromName, guessContentTypeFromStream, setAllowUserInteraction, setConnectTimeout, setContentHandlerFactory, setDefaultAllowUserInteraction, setDefaultRequestProperty, setDefaultUseCaches, setDoInput, setDoOutput, setFileNameMap, setIfModifiedSince, setReadTimeout, setRequestProperty, setUseCaches, toString
protected Store store
protected Folder folder
protected Message message
protected java.util.Map headers
public MailboxURLConnection(java.net.URL url)
url
- the URL representing the mailbox to connect topublic void connect() throws java.io.IOException
connect
in class java.net.URLConnection
java.io.IOException
public java.lang.String getHeaderField(int index)
getHeaderField
in class java.net.URLConnection
public java.lang.String getHeaderFieldKey(int index)
getHeaderFieldKey
in class java.net.URLConnection
public java.lang.String getHeaderField(java.lang.String name)
getHeaderField
in class java.net.URLConnection
public java.util.Map getHeaderFields()
getHeaderFields
in class java.net.URLConnection
public java.lang.Object getContent() throws java.io.IOException
getContent
in class java.net.URLConnection
java.io.IOException
public java.io.InputStream getInputStream() throws java.io.IOException
getInputStream
in class java.net.URLConnection
java.io.IOException
protected static URLName asURLName(java.net.URL url)