java.lang.Object
ch.qos.logback.core.util.LocationUtil
A static utility method that converts a string that describes the location of
a resource into a
URL
object.- Author:
- Carl Harris
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic URL
urlForResource
(String location) Converts a string describing the location of a resource into a URL object.
-
Field Details
-
SCHEME_PATTERN
Regex pattern for a URL scheme (reference RFC 2396 section 3)- See Also:
-
CLASSPATH_SCHEME
Scheme name for a classpath resource- See Also:
-
-
Constructor Details
-
LocationUtil
public LocationUtil()
-
-
Method Details
-
urlForResource
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 describing the location- Returns:
- URL object that refers to
location
- Throws:
MalformedURLException
- iflocation
is not a syntactically valid URLFileNotFoundException
- iflocation
specifies a non-existent classpath resourceNullPointerException
- iflocation
isnull
-