|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.config.ConfigurationSource
public class ConfigurationSource
Represents the source for the logging configuration.
Field Summary | |
---|---|
static ConfigurationSource |
NULL_SOURCE
|
Constructor Summary | |
---|---|
ConfigurationSource(InputStream stream)
Constructs a new ConfigurationSource with the specified input stream. |
|
ConfigurationSource(InputStream stream,
File file)
Constructs a new ConfigurationSource with the specified input stream that originated from the specified
file. |
|
ConfigurationSource(InputStream stream,
URL url)
Constructs a new ConfigurationSource with the specified input stream that originated from the specified
url. |
Method Summary | |
---|---|
File |
getFile()
Returns the file configuration source, or null if this configuration source is based on an URL or has
neither a file nor an URL. |
InputStream |
getInputStream()
Returns the input stream that this configuration source was constructed with. |
String |
getLocation()
Returns a string describing the configuration source file or URL, or null if this configuration source
has neither a file nor an URL. |
URL |
getURL()
Returns the configuration source URL, or null if this configuration source is based on a file or has
neither a file nor an URL. |
ConfigurationSource |
resetInputStream()
Returns a new ConfigurationSource whose input stream is reset to the beginning. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final ConfigurationSource NULL_SOURCE
Constructor Detail |
---|
public ConfigurationSource(InputStream stream) throws IOException
ConfigurationSource
with the specified input stream. Since the stream is the only source
of data, this constructor makes a copy of the stream contents.
stream
- the input stream
IOException
- if an exception occurred reading from the specified streampublic ConfigurationSource(InputStream stream, File file)
ConfigurationSource
with the specified input stream that originated from the specified
file.
stream
- the input streamfile
- the file where the input stream originatedpublic ConfigurationSource(InputStream stream, URL url)
ConfigurationSource
with the specified input stream that originated from the specified
url.
stream
- the input streamurl
- the URL where the input stream originatedMethod Detail |
---|
public File getFile()
null
if this configuration source is based on an URL or has
neither a file nor an URL.
null
public URL getURL()
null
if this configuration source is based on a file or has
neither a file nor an URL.
null
public String getLocation()
null
if this configuration source
has neither a file nor an URL.
null
public InputStream getInputStream()
public ConfigurationSource resetInputStream() throws IOException
ConfigurationSource
whose input stream is reset to the beginning.
ConfigurationSource
IOException
- if a problem occurred while opening the new input streampublic String toString()
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 1999-2015 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.