APIdia Launch Partner
Top Fields Constructors Methods
sun.net.www.protocol.jar

public Class Handler

extends URLStreamHandler
Class Inheritance
Imports
java.io.IOException, java.net.*

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static String
canonicalizeString(String file, int off)

Returns a version of the specified string with canonicalization applied starting from position off

public String
private static String
protected int
hashCode(URL u)

Overrides java.net.URLStreamHandler.hashCode.

Provides the default hash calculation.

private static int
private static URL
newURL(String spec)

protected URLConnection
openConnection(URL u)

Implements abstract java.net.URLStreamHandler.openConnection.

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

private String
private String
protected void
parseURL(URL url, String spec, int start, int limit)

Overrides java.net.URLStreamHandler.parseURL.

Parses the string representation of a URL into a URL object.

protected boolean
sameFile(URL u1, URL u2)

Overrides java.net.URLStreamHandler.sameFile.

Compare two jar URLs

Inherited from java.net.URLStreamHandler:
equalsgetDefaultPortgetHostAddresshostsEqualopenConnectionsetURLsetURLtoExternalForm

Field Detail

separatorback to summary
private static final String separator

Constructor Detail

Handlerback to summary
public Handler()

Method Detail

canonicalizeStringback to summary
private static String canonicalizeString(String file, int off)

Returns a version of the specified string with canonicalization applied starting from position off

checkNestedProtocolback to summary
public String checkNestedProtocol(String spec)
doCanonicalizeback to summary
private static String doCanonicalize(String file)
hashCodeback to summary
protected int hashCode(URL u)

Overrides java.net.URLStreamHandler.hashCode.

Doc from java.net.URLStreamHandler.hashCode.

Provides the default hash calculation. May be overridden by handlers for other protocols that have different requirements for hashCode calculation.

Annotations
@Override
indexOfBangSlashback to summary
private static int indexOfBangSlash(String spec)
newURLback to summary
private static URL newURL(String spec) throws MalformedURLException
Annotations
@SuppressWarnings:deprecation
openConnectionback to summary
protected URLConnection openConnection(URL u) throws IOException

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.

Exceptions
IOException:
if an I/O error occurs while opening the connection.
parseAbsoluteSpecback to summary
private String parseAbsoluteSpec(String spec)
parseContextSpecback to summary
private String parseContextSpec(URL url, String spec)
parseURLback to summary
protected void parseURL(URL url, String spec, int start, int limit)

Overrides java.net.URLStreamHandler.parseURL.

Doc from java.net.URLStreamHandler.parseURL.

Parses the string representation of a URL into a URL object.

If there is any inherited context, then it has already been copied into the URL argument.

The parseURL method of URLStreamHandler parses the string representation as if it were an http specification. Most URL protocol families have a similar parsing. A stream protocol handler for a protocol that has a different syntax must override this routine.

Annotations
@Override
@SuppressWarnings:deprecation
sameFileback to summary
protected boolean sameFile(URL u1, URL u2)

Overrides java.net.URLStreamHandler.sameFile.

Compare two jar URLs

Annotations
@Override