public class Source extends Object
Constructor and Description |
---|
Source(ConfigurationSource source)
Constructs a Source from a ConfigurationSource.
|
Source(File file)
Constructs a new
Source with the specified file. |
Source(Path path)
Constructs a new
Source from the specified Path. |
Source(URI uri)
Constructs a new
Source from the specified URI. |
Source(URI uri,
long lastModified)
Deprecated.
Use
Source(URI) . |
Source(URL url)
Constructs a new
Source from the specified URL. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
File |
getFile()
Gets the file configuration source, or
null if this configuration source is based on an URL or has
neither a file nor an URL. |
String |
getLocation()
Gets a string describing the configuration source file or URI, or
null if this configuration source
has neither a file nor an URI. |
Path |
getPath()
Gets this source as a Path.
|
URI |
getURI()
Gets the configuration source URI, or
null if this configuration source is based on a file or has
neither a file nor an URI. |
URL |
getURL()
Gets the configuration source URL.
|
int |
hashCode() |
String |
toString() |
public Source(ConfigurationSource source)
source
- The ConfigurationSource.public Source(File file)
Source
with the specified file.
file.file
- the file where the input stream originatedpublic Source(Path path)
Source
from the specified Path.path
- the Path where the input stream originatedpublic Source(URI uri)
Source
from the specified URI.uri
- the URI where the input stream originated@Deprecated public Source(URI uri, long lastModified)
Source(URI)
.Source
from the specified URI.uri
- the URI where the input stream originatedlastModified
- Not used.public Source(URL url)
Source
from the specified URL.url
- the URL where the input stream originatedIllegalArgumentException
- if this URL is not formatted strictly according to RFC2396 and cannot be
converted to a URI.public File getFile()
null
if this configuration source is based on an URL or has
neither a file nor an URL.null
public String getLocation()
null
if this configuration source
has neither a file nor an URI.null
public Path getPath()
public URI getURI()
null
if this configuration source is based on a file or has
neither a file nor an URI.null
public URL getURL()
null
Copyright © 1999-2023 The Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.