getOutputStream, write the message to the output
stream, and close it.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv SmtpClient | |
| private int | |
| pack-priv InputStream | |
| pack-priv OutputStream | |
| private int |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | connect()
Implements abstract java. Opens a communications link to the resource referenced by this URL, if such a connection has not already been established. |
| public int | getConnectTimeout()
Overrides java. Returns setting for connect timeout. |
| pack-priv String | |
| public synchronized OutputStream | getOutputStream()
Overrides java. Returns an output stream that writes to this connection. |
| public int | |
| public void | setConnectTimeout(int timeout)
Overrides java. Sets a specified timeout value, in milliseconds, to be used when opening a communications link to the resource referenced by this URLConnection. |
| public void | setReadTimeout(int timeout)
Overrides java. Sets the read timeout to a specified timeout, in milliseconds. |
| client | back to summary |
|---|---|
| pack-priv SmtpClient client | |
| connectTimeout | back to summary |
|---|---|
| private int connectTimeout | |
| is | back to summary |
|---|---|
| pack-priv InputStream is | |
| os | back to summary |
|---|---|
| pack-priv OutputStream os | |
| readTimeout | back to summary |
|---|---|
| private int readTimeout | |
| MailToURLConnection | back to summary |
|---|---|
| pack-priv MailToURLConnection(URL u) | |
| connect | back to summary |
|---|---|
| public void connect() throws IOException Implements abstract java. Doc from java. Opens a communications link to the resource referenced by this URL, if such a connection has not already been established.
If the URLConnection objects go through two phases: first they are created, then they are connected. After being created, and before being connected, various options can be specified (e.g., doInput and UseCaches). After connecting, it is an error to try to set them. Operations that depend on being connected, like getContentLength, will implicitly perform the connection, if necessary.
| |
| getConnectTimeout | back to summary |
|---|---|
| public int getConnectTimeout() Overrides java. Doc from java. Returns setting for connect timeout. 0 return implies that the option is disabled (i.e., timeout of infinity).
| |
| getFromAddress | back to summary |
|---|---|
| pack-priv String getFromAddress() Get the user's full email address - stolen from HotJavaApplet.getMailAddress(). | |
| getOutputStream | back to summary |
|---|---|
| public synchronized OutputStream getOutputStream() throws IOException Overrides java. Doc from java. Returns an output stream that writes to this connection.
| |
| getReadTimeout | back to summary |
|---|---|
| public int getReadTimeout() Overrides java. Doc from java. Returns setting for read timeout. 0 return implies that the option is disabled (i.e., timeout of infinity).
| |
| setConnectTimeout | back to summary |
|---|---|
| public void setConnectTimeout(int timeout) Overrides java. Doc from java. Sets a specified timeout value, in milliseconds, to be used when opening a communications link to the resource referenced by this URLConnection. If the timeout expires before the connection can be established, a java.net.SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout. Some non-standard implementation of this method may ignore the specified timeout. To see the connect timeout set, please call getConnectTimeout().
| |
| setReadTimeout | back to summary |
|---|---|
| public void setReadTimeout(int timeout) Overrides java. Doc from java. Sets the read timeout to a specified timeout, in milliseconds. A non-zero value specifies the timeout when reading from Input stream when a connection is established to a resource. If the timeout expires before there is data available for read, a java.net.SocketTimeoutException is raised. A timeout of zero is interpreted as an infinite timeout. Some non-standard implementation of this method ignores the specified timeout. To see the read timeout set, please call getReadTimeout().
| |