APIdia Launch Partner
Top Description Constructors Methods
sun.net.www.protocol.mailto

public Class Handler

extends URLStreamHandler
Class Inheritance
Imports
java.net.URL, .URLConnection, .URLStreamHandler

open an nntp input stream given a URL

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public URLConnection
openConnection(URL u)

Implements abstract java.net.URLStreamHandler.openConnection.

Opens a connection to the object referenced by the URL argument.

public void
parseURL(URL
the URL to receive the result of parsing the spec
u
,
String
the URL string to parse
spec
,
int
the character position to start parsing at. This is just past the ':'.
start
,
int
the character position to stop parsing at.
limit
)

Overrides java.net.URLStreamHandler.parseURL.

This method is called to parse the string spec into URL u for a mailto protocol.

private void
setURLHandler(URL u, String protocol, String host, int port, String file)

This method is used to suppress the deprecated warning

Inherited from java.net.URLStreamHandler:
equalsgetDefaultPortgetHostAddresshashCodehostsEqualopenConnectionsameFilesetURLsetURLtoExternalForm

Constructor Detail

Handlerback to summary
public Handler()

Method Detail

openConnectionback to summary
public URLConnection openConnection(URL u)

Implements abstract java.net.URLStreamHandler.openConnection.

Doc from java.net.URLStreamHandler.openConnection.

Opens a connection to the object referenced by the URL argument. This method should be overridden by a subclass.

If for the handler's protocol (such as HTTP or JAR), there exists a public, specialized URLConnection subclass belonging to one of the following packages or one of their subpackages: java.lang, java.io, java.util, java.net, the connection returned will be of that subclass. For example, for HTTP an HttpURLConnection will be returned, and for JAR a JarURLConnection will be returned.

parseURLback to summary
public void parseURL(URL u, String spec, int start, int limit)

Overrides java.net.URLStreamHandler.parseURL.

This method is called to parse the string spec into URL u for a mailto protocol.

Parameters
u:URL

the URL to receive the result of parsing the spec

spec:String

the URL string to parse

start:int

the character position to start parsing at. This is just past the ':'.

limit:int

the character position to stop parsing at.

setURLHandlerback to summary
private void setURLHandler(URL u, String protocol, String host, int port, String file)

This method is used to suppress the deprecated warning

Annotations
@SuppressWarnings:deprecation