Interface ILcyPropertiesDecoder
- All Known Implementing Classes:
TLcyStringPropertiesCodec
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.
-
Method Summary
Modifier and TypeMethodDescriptionboolean
canDecodeSource
(String aSourceName) Checks whether thisILcyPropertiesDecoder
can decode the specified data source.Decodes the given source name into anALcyProperties
object.void
decodeSFCT
(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite) Decodes the given source name into a givenALcyProperties
object.
-
Method Details
-
canDecodeSource
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.
- Parameters:
aSourceName
- the data source to be verified; typically a file name or a URL.- Returns:
true
if this decoder can decode the data specified by the source name,false
otherwise.- See Also:
-
decode
Decodes the given source name into an
ALcyProperties
object.- Parameters:
aSourceName
- The source name to decode from. Must not benull
.- Returns:
- The decoded
ALcyProperties
. Nevernull
. - Throws:
IOException
- In case of IO failure.
-
decodeSFCT
void decodeSFCT(String aSourceName, ALcyProperties aPropsSFCT, boolean aOverwrite) throws IOException Decodes the given source name into a given
ALcyProperties
object.- Parameters:
aSourceName
- The source name to decode from.aPropsSFCT
- The properties to load into. Must not benull
.aOverwrite
-true
to overwrite existing properties if they are also present in the given source.false
to leave existing properties unchanged.- Throws:
IOException
- In case of IO failure.
-