Package org.mycore.common.config
Class MCRConfigurationInputStream
java.lang.Object
java.io.InputStream
org.mycore.common.config.MCRConfigurationInputStream
- All Implemented Interfaces:
Closeable
,AutoCloseable
A InputStream from (preferably) property files. All available InputStreams are combined in this order:
- mycore-base
- other mycore-components
- application modules
- installation specific files
- Since:
- 2013.12
- Author:
- Thomas Scheffler (yagee), Robert Stephan
-
Constructor Summary
ConstructorDescriptionMCRConfigurationInputStream
(String filename) Combined Stream of all config files namedfilename
available viaMCRRuntimeComponentDetector.getAllComponents()
. -
Method Summary
Modifier and TypeMethodDescriptionint
void
close()
static List<byte[]>
getConfigFileContents
(String filename) return an enumeration of input streams of configuration files found in MyCoRe components and modules, respecting the proper loading orderstatic MCRConfigurationInputStream
InputStream
that includes all properties fromMCRRuntimeComponentDetector.getAllComponents()
and mycore.properties.boolean
isEmpty()
int
read()
int
read
(byte[] b, int off, int len) Methods inherited from class java.io.InputStream
mark, markSupported, nullInputStream, read, readAllBytes, readNBytes, readNBytes, reset, skip, skipNBytes, transferTo
-
Constructor Details
-
MCRConfigurationInputStream
Combined Stream of all config files namedfilename
available viaMCRRuntimeComponentDetector.getAllComponents()
.- Parameters:
filename
- , e.g. mycore.properties or messages_de.properties- Throws:
IOException
-
-
Method Details
-
getMyCoRePropertiesInstance
InputStream
that includes all properties fromMCRRuntimeComponentDetector.getAllComponents()
and mycore.properties. Use system propertyMCR.Configuration.File
to configure alternative property file.- Throws:
IOException
- Since:
- 2014.04
-
isEmpty
public boolean isEmpty() -
getConfigFileContents
return an enumeration of input streams of configuration files found in MyCoRe components and modules, respecting the proper loading order- Throws:
IOException
-
available
- Overrides:
available
in classInputStream
- Throws:
IOException
-
read
- Specified by:
read
in classInputStream
- Throws:
IOException
-
read
- Overrides:
read
in classInputStream
- Throws:
IOException
-
close
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classInputStream
- Throws:
IOException
-