Top Description Fields Constructors Methods
ch.qos.logback.core.util

public Class LocationUtil

extends Object
Class Inheritance
Imports
java.io.FileNotFoundException, java.net.MalformedURLException, .URL

A static utility method that converts a string that describes the location of a resource into a URL object.
Author
Carl Harris

Field Summary

Modifier and TypeField and Description
public static final String
CLASSPATH_SCHEME

Scheme name for a classpath resource

public static final String
SCHEME_PATTERN

Regex pattern for a URL scheme (reference RFC 2396 section 3)

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static URL

Returns:

URL object that refers to location
urlForResource
(String
String describing the location
location
)

Converts a string describing the location of a resource into a URL object.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CLASSPATH_SCHEMEback to summary
public static final String CLASSPATH_SCHEME

Scheme name for a classpath resource

SCHEME_PATTERNback to summary
public static final String SCHEME_PATTERN

Regex pattern for a URL scheme (reference RFC 2396 section 3)

Constructor Detail

LocationUtilback to summary
public LocationUtil()

Method Detail

urlForResourceback to summary
public static URL urlForResource(String location) throws MalformedURLException, FileNotFoundException

Converts a string describing the location of a resource into a URL object.

Parameters
location:String

String describing the location

Returns:URL

URL object that refers to location

Exceptions
MalformedURLException:
if location is not a syntactically valid URL
FileNotFoundException:
if location specifies a non-existent classpath resource
NullPointerException:
if location is null