au.edu.swin.synergy.lib.io
Class BDataFile
java.lang.Object
|
+--au.edu.swin.synergy.lib.io.BDataFile
- public class BDataFile
- extends Object
- Author:
- John Newbigin
- Requirement/analysis/design Reference:
-
- Copyright Belongs To:
- Synergy Software
- See Also:
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
BDataFile
public BDataFile(String fFileName)
getFileName
public String getFileName()
save
public boolean save(BSaveable object)
load
public boolean load(BSaveable object)
autoLoad
public BSaveable autoLoad()
setUserObject
public void setUserObject(Object fObject)
getUserObject
public Object getUserObject()
openFileForRead
public boolean openFileForRead()
- openFileForRead
- Returns:
- true if the file could be opened, otherwise false
- Post Condition:
- the file is opened for reading
openFileForWrite
public boolean openFileForWrite(boolean append)
- opens a file for writing
- Parameters:
append
- if append is false, then any existing data will be overwritten- Returns:
- true if the file could be opened
- Post Condition:
- the file is opened for writing
close
public void close()
- close an open file
- Pre Condition:
- the file is open
- Post Condition:
- the file is closed
addTag
public void addTag(String fTag)
addData
public void addData(String fKey,
String fData,
String fDefault)
- Add a key=data to the file, but only if
data != default
Handling is done for null
addData
public void addData(String fKey,
String fData)
getData
public String getData(String fKey,
String fDefault)