public interface ILcyPropertiesDecoder
Creates new or popuplates existing ALcyProperties
from files or other data
sources.
The supported data sources and type of ALcyProperties
instances
are defined by the actual implementations of this interface.
Modifier and Type | Method and Description |
---|---|
boolean |
canDecodeSource(String aSourceName)
Checks whether this
ILcyPropertiesDecoder can decode the specified data
source. |
ALcyProperties |
decode(String aSourceName)
Decodes the given source name into an
ALcyProperties object. |
void |
decodeSFCT(String aSourceName,
ALcyProperties aPropsSFCT,
boolean aOverwrite)
Decodes the given source name into a given
ALcyProperties object. |
boolean canDecodeSource(String aSourceName)
Checks whether this ILcyPropertiesDecoder
can decode the specified data
source.
Often this will only be a simple test, for example checking the file extension of a file.
aSourceName
- the data source to be verified; typically a file name or a URL.true
if this decoder can decode the data specified by the source name, false
otherwise.decode(java.lang.String)
ALcyProperties decode(String aSourceName) throws IOException
Decodes the given source name into an ALcyProperties
object.
aSourceName
- The source name to decode from. Must not be null
.ALcyProperties
. Never null
.IOException
- In case of IO failure.void decodeSFCT(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite) throws IOException
Decodes the given source name into a given ALcyProperties
object.
aSourceName
- The source name to decode from.aPropsSFCT
- The properties to load into. Must not be null
.aOverwrite
- true
to overwrite existing properties if they are also present
in the given source. false
to leave existing properties
unchanged.IOException
- In case of IO failure.