# Class PlurlStreamHandlerBase

java.lang.Object
java.net.URLStreamHandler
org.eclipse.equinox.plurl.PlurlStreamHandlerBase

All Implemented Interfaces:
  `PlurlStreamHandler`

Direct Known Subclasses:
  `BundleResourceHandler, Handler`

public abstract class PlurlStreamHandlerBase extends URLStreamHandler implements PlurlStreamHandler
Abstract implementation of the `PlurlStreamHandler` interface. All the methods simply invoke the corresponding methods on `java.net.URLStreamHandler` except for `parseURL` and `setURL`, which use the `PlurlSetter` parameter. Subclasses of this abstract class should not need to override the `setURL` and `parseURL(URLStreamHandlerSetter,...)` methods.

## Nested Class Summary

### Nested classes/interfaces inherited from interface PlurlStreamHandler

`PlurlStreamHandler.PlurlSetter`

## Constructor Summary

Constructors
Constructor
Description
`PlurlStreamHandlerBase()`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(URL u1, URL u2)`
This method calls `super.equals(URL,URL)`.
`int`
`getDefaultPort()`
This method calls `super.getDefaultPort`.
`InetAddress`
`getHostAddress(URL u)`
This method calls `super.getHostAddress`.
`int`
`hashCode(URL u)`
This method calls `super.hashCode(URL)`.
`boolean`
`hostsEqual(URL u1, URL u2)`
This method calls `super.hostsEqual`.
`abstract URLConnection`
`openConnection(URL u)`
`URLConnection`
`openConnection(URL u, Proxy p)`
This method calls `super.openConnection(URL, Proxy)`
`void`
`parseURL(PlurlStreamHandler.PlurlSetter setter, URL u, String spec, int start, int limit)`
Parse a URL using the `PlurlSetter` object.
`boolean`
`sameFile(URL u1, URL u2)`
This method calls `super.sameFile`.
`void`
`setURL(URL u, String proto, String host, int port, String file, String ref)`
This method calls `plurlSetter.setURL(URL,String,String,int,String,String,String,String)`.
`void`
`setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref)`
This method calls `realHandler.setURL(URL,String,String,int,String,String,String,String)` .
`String`
`toExternalForm(URL u)`
This method calls `super.toExternalForm`.

### Methods inherited from class URLStreamHandler

`parseURL`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### PlurlStreamHandlerBase

public PlurlStreamHandlerBase()

## Method Details

### openConnection

public abstract URLConnection openConnection(URL u) throws IOException

Specified by:
  `openConnection` in interface `PlurlStreamHandler`
Specified by:
  `openConnection` in class `URLStreamHandler`
Throws:
  `IOException`
See Also:
  - "java.net.URLStreamHandler.openConnection(URL)"

### parseURL

public void parseURL(PlurlStreamHandler.PlurlSetter setter, URL u, String spec, int start, int limit)
Parse a URL using the `PlurlSetter` object. This method sets the `plurlSetter` field with the specified `PlurlSetter` object and then calls `parseURL(URL,String,int,int)`.

Specified by:
  `parseURL` in interface `PlurlStreamHandler`
Parameters:
  `setter` - The object on which the `setURL` method must be invoked for the specified URL.
See Also:
  - "java.net.URLStreamHandler.parseURL"

### openConnection

public URLConnection openConnection(URL u, Proxy p) throws IOException
This method calls `super.openConnection(URL, Proxy)`

Specified by:
  `openConnection` in interface `PlurlStreamHandler`
Overrides:
  `openConnection` in class `URLStreamHandler`
Throws:
  `IOException`
See Also:
  - "java.net.URLStreamHandler.openConnection(URL, Proxy)"

### toExternalForm

public String toExternalForm(URL u)
This method calls `super.toExternalForm`.

Specified by:
  `toExternalForm` in interface `PlurlStreamHandler`
Overrides:
  `toExternalForm` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.toExternalForm"

### equals

public boolean equals(URL u1, URL u2)
This method calls `super.equals(URL,URL)`.

Specified by:
  `equals` in interface `PlurlStreamHandler`
Overrides:
  `equals` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.equals(URL,URL)"

### getDefaultPort

public int getDefaultPort()
This method calls `super.getDefaultPort`.

Specified by:
  `getDefaultPort` in interface `PlurlStreamHandler`
Overrides:
  `getDefaultPort` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.getDefaultPort"

### getHostAddress

public InetAddress getHostAddress(URL u)
This method calls `super.getHostAddress`.

Specified by:
  `getHostAddress` in interface `PlurlStreamHandler`
Overrides:
  `getHostAddress` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.getHostAddress"

### hashCode

public int hashCode(URL u)
This method calls `super.hashCode(URL)`.

Specified by:
  `hashCode` in interface `PlurlStreamHandler`
Overrides:
  `hashCode` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.hashCode(URL)"

### hostsEqual

public boolean hostsEqual(URL u1, URL u2)
This method calls `super.hostsEqual`.

Specified by:
  `hostsEqual` in interface `PlurlStreamHandler`
Overrides:
  `hostsEqual` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.hostsEqual"

### sameFile

public boolean sameFile(URL u1, URL u2)
This method calls `super.sameFile`.

Specified by:
  `sameFile` in interface `PlurlStreamHandler`
Overrides:
  `sameFile` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.sameFile"

### setURL

public void setURL(URL u, String proto, String host, int port, String file, String ref)
This method calls `plurlSetter.setURL(URL,String,String,int,String,String,String,String)`.

Specified by:
  `setURL` in interface `PlurlStreamHandler`
Overrides:
  `setURL` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String)"

### setURL

public void setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref)
This method calls `realHandler.setURL(URL,String,String,int,String,String,String,String)` .

Specified by:
  `setURL` in interface `PlurlStreamHandler`
Overrides:
  `setURL` in class `URLStreamHandler`
See Also:
  - "java.net.URLStreamHandler.setURL(URL,String,String,int,String,String,String,String)"