java.lang.Object
de.grogra.pf.io.FilterSourceBase
de.grogra.pf.io.FileSource
de.grogra.pf.io.PreferencesFile
- All Implemented Interfaces:
FileReaderSource,FilterSource,InputStreamSource,ReaderSource,VirtualFileReaderSource,RegistryContext,CountingInputStream.Monitor
A file used to read options locally.
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.grogra.pf.io.FilterSource
FilterSource.MetaDataKey<V> -
Field Summary
Fields inherited from interface de.grogra.pf.io.FilterSource
AUTO_PROGRESS, DESTINATION_FILE, DESTINATION_URL -
Constructor Summary
ConstructorsConstructorDescriptionPreferencesFile(File file, Registry reg, ModifiableMap m) PreferencesFile(File file, MimeType mimeType, Registry reg, ModifiableMap metaData) -
Method Summary
Modifier and TypeMethodDescriptiongetPreference(String name) Preferences are only get once, then they are set to global pref.voidReturn the value of a preference without removing it from the set.voidvoidwriteOption(String opt, String val) Add a option value.Methods 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
-
Constructor Details
-
PreferencesFile
-
PreferencesFile
-
-
Method Details
-
loadProperties
- Throws:
IOException
-
getPreference
Preferences are only get once, then they are set to global pref.- Parameters:
name-- Returns:
-
peekAt
Return the value of a preference without removing it from the set.- Parameters:
name-- Returns:
-
writeOption
Add a option value. If the option is already referred in the property file change its value instead. -
printOptions
public void printOptions()
-