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, writeTypeFields 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 TypedTextPropertyFilefromFile(File file, RegistryContext ctx) Read or create a file.static TypedTextPropertyFilefromFile(String name, RegistryContext ctx) static TypedTextPropertyFilefromProjectFile(String name, RegistryContext ctx) voidload()Read the file and fill the property mapvoidsave()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, setListMethods inherited from class de.grogra.pf.io.FileSource
bytesRead, createFileSource, getFile, getFileSystem, getInputFile, getInputStream, getOutputStream, getReader, getSystemId, getWriter, isReadOnly, length, readContent, streamClosed, toURLMethods inherited from class de.grogra.pf.io.FilterSourceBase
getFilter, getFlavor, getMetaData, getRegistry, initProgressMonitor, setMetaData, setProgress, setProgress0, setProgressImpl, toString, useAutoProgressMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.grogra.pf.io.FilterSource
getFilter, getFlavor, getMetaData, initProgressMonitor, setMetaData, setProgressMethods 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:PropertyFileRead the file and fill the property map- Specified by:
loadin classPropertyFile
-
save
public void save()Description copied from class:PropertyFileWrite the property map in the file- Specified by:
savein classPropertyFile
-
fromProjectFile
-
fromFile
Read or create a file. -
fromFile
-