java.lang.Object
de.grogra.pf.io.FilterSourceBase
de.grogra.pf.io.FileSource
de.grogra.propFile.PropertyFile
de.grogra.propFile.TypedTextPropertyFile
- All Implemented Interfaces:
FileReaderSource
,FilterSource
,InputStreamSource
,ReaderSource
,VirtualFileReaderSource
,RegistryContext
,CountingInputStream.Monitor
A "key value" property file. The file do not save the type of
the objects saved. Thus, To load the properties a object of
the target type is REQUIRED as parameter of the getProperty(key, OBJECT);
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V>
-
Field Summary
FieldsFields inherited from class de.grogra.propFile.PropertyFile
defaultElementsClass, writeType
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL
-
Constructor Summary
ConstructorsConstructorDescriptionTypedTextPropertyFile
(FileSystem fs, Object file, RegistryContext reg, ModifiableMap metaData) -
Method Summary
Modifier and TypeMethodDescriptionstatic TypedTextPropertyFile
fromFile
(File file, RegistryContext ctx) Read or create a file.static TypedTextPropertyFile
fromFile
(String name, RegistryContext ctx) static TypedTextPropertyFile
fromProjectFile
(String name, RegistryContext ctx) void
load()
Read the file and fill the property mapvoid
save()
Write the property map in the fileMethods inherited from class de.grogra.propFile.PropertyFile
clear, get, get, get, get, get, get, get, get, get, get, get, getBoolean, getByte, getChar, getDefaultCollectionElement, getDouble, getFloat, getInt, getList, getLong, getMimeType, getShort, getString, set, set, set, set, set, set, set, set, set, set, setDefaultCollectionElement, setDefaultCollectionElement, setList
Methods inherited from class de.grogra.pf.io.FileSource
bytesRead, createFileSource, getFile, getFileSystem, getInputFile, getInputStream, getOutputStream, getReader, getSystemId, getWriter, isReadOnly, length, readContent, streamClosed, toURL
Methods inherited from class de.grogra.pf.io.FilterSourceBase
getFilter, getFlavor, getMetaData, getRegistry, initProgressMonitor, setMetaData, setProgress, setProgress0, setProgressImpl, toString, useAutoProgress
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, initProgressMonitor, setMetaData, setProgress
Methods inherited from interface de.grogra.pf.registry.RegistryContext
getRegistry
-
Field Details
-
COMMENT_PREFIX
- See Also:
-
SEPARATOR
- See Also:
-
-
Constructor Details
-
TypedTextPropertyFile
public TypedTextPropertyFile(FileSystem fs, Object file, RegistryContext reg, ModifiableMap metaData)
-
-
Method Details
-
load
public void load()Description copied from class:PropertyFile
Read the file and fill the property map- Specified by:
load
in classPropertyFile
-
save
public void save()Description copied from class:PropertyFile
Write the property map in the file- Specified by:
save
in classPropertyFile
-
fromProjectFile
-
fromFile
Read or create a file. -
fromFile
-