All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.ocap.net.URLLocator Maven / Gradle / Ivy

There is a newer version: 1.3.1
Show newest version
/*
 * Created on Feb 12, 2007
 */
package org.ocap.net;

import java.net.MalformedURLException;
import java.net.URL;

import org.davic.net.InvalidLocatorException;
import org.davic.net.Locator;

/**
 * A concrete implementation of Locator that encapsulates a URL into an object.
 * 

* Instances of this class MAY be used to reference any resource that is referencable * using an instance of URL. * * @see URL * * @author Aaron Kamienski */ public class URLLocator extends Locator { /** * Construct an URLLocator encapsulating the given URL. *

* The accepted syntax SHALL be identical to that accepted by {@link URL#URL(String)}. * * @param url a URL string * * @throws InvalidLocatorException if URL(String) would throw {@link MalformedURLException} */ public URLLocator(String url) throws InvalidLocatorException { super(url); } /** * Construct an URLLocator encapsulating the given URL. *

* This SHALL be equivalent to new URLLocator(url.toString()). * * @param url the URL expressed as an instance of URL * * @see #URLLocator(String) */ public URLLocator(URL url) { super(url.toString()); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy