Package ch.qos.logback.core.util
Class LocationUtil
- java.lang.Object
-
- ch.qos.logback.core.util.LocationUtil
-
-
Field Summary
Fields Modifier and Type Field Description static StringCLASSPATH_SCHEMEScheme name for a classpath resourcestatic StringSCHEME_PATTERNRegex pattern for a URL scheme (reference RFC 2396 section 3)
-
Constructor Summary
Constructors Constructor Description LocationUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URLurlForResource(String location)Converts a string describing the location of a resource into a URL object.
-
-
-
Field Detail
-
SCHEME_PATTERN
public static final String SCHEME_PATTERN
Regex pattern for a URL scheme (reference RFC 2396 section 3)- See Also:
- Constant Field Values
-
CLASSPATH_SCHEME
public static final String CLASSPATH_SCHEME
Scheme name for a classpath resource- See Also:
- Constant Field Values
-
-
Method Detail
-
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- iflocationis not a syntatically valid URLFileNotFoundException- iflocationspecifies a non-existent classpath resourceNullPointerException- iflocationisnull
-
-