com.gridsystems.utils
Class SecureFileProperties

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.Object,java.lang.Object>
          extended by java.util.Properties
              extended by com.gridsystems.utils.FileProperties
                  extended by com.gridsystems.utils.SecureFileProperties
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.Object,java.lang.Object>
Direct Known Subclasses:
SortedFileProperties

public class SecureFileProperties
extends FileProperties

This class implements a SecureProperties object linked to a File object. A SecureProperties file assures that it is not corrupted.

Version:
1.0
Author:
Luis Gaspart
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.gridsystems.utils.FileProperties
f, header, lastModified, lockWrite, synchronize, ts
 
Fields inherited from class java.util.Properties
defaults
 
Constructor Summary
SecureFileProperties(java.io.File f)
          Creates a new instance.
SecureFileProperties(java.io.File f, java.util.Properties defaults)
          Creates a new instance.
 
Method Summary
 void commit()
          Propagates changes in memory to the file associated with this object.
 void load(java.io.InputStream inStream)
          
 
Methods inherited from class com.gridsystems.utils.FileProperties
getBoolProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getProperty, getProperty, lockWrites, propertyNames, setFile, setHeader, setProperty, sync, unlockWrites
 
Methods inherited from class java.util.Properties
list, list, load, loadFromXML, save, store, store, storeToXML, storeToXML, stringPropertyNames
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SecureFileProperties

public SecureFileProperties(java.io.File f,
                            java.util.Properties defaults)
Creates a new instance.

Parameters:
f - The file to link this instance to
defaults - The default values

SecureFileProperties

public SecureFileProperties(java.io.File f)
Creates a new instance.

Parameters:
f - The file to link this instance to
Method Detail

commit

public void commit()
Propagates changes in memory to the file associated with this object.

Overrides:
commit in class FileProperties

load

public void load(java.io.InputStream inStream)
          throws java.io.IOException

Overrides:
load in class java.util.Properties
Throws:
java.io.IOException


Copyright © 2007-2008 Grid Systems, S.A.. All Rights Reserved.