jAsea
Class ReadAdrift2
java.lang.Object
|
+--jAsea.ReadAdrift2
- class ReadAdrift2
- extends java.lang.Object
Field Summary |
(package private) java.util.Vector |
resourceList
|
(package private) static java.lang.String |
Separator
Terminator for a multiline String in a raw file |
Constructor Summary |
(package private) |
ReadAdrift2(java.lang.String Filename)
|
Method Summary |
static void |
main(java.lang.String[] args)
|
(package private) static jAseaObject |
readFile(java.lang.String fn)
Reads file
If last character in name is 'C' (for .DEC, decompressed)
it reads the file directly
If last character in name is 'f' (for .taf),
it runs the file through a decompresser first. |
(package private) jAseaObject |
readResource(boolean sound,
boolean graph)
|
(package private) void |
readSetProp(java.util.Hashtable ht,
java.lang.String prop)
Reads in property of the type given in 'prop',
and then sets a field of the appropriate name in 'ht'
The first few characters of a property give the type of the field
to read; the rest give the name of the property to set. |
(package private) void |
readSetProp(java.util.Hashtable ht,
java.lang.String[] props)
Reads in properties of the type given in 'props',
and then sets a field of the appropriate name in 'ht' |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Separator
static final java.lang.String Separator
- Terminator for a multiline String in a raw file
- See Also:
- Constant Field Values
resourceList
java.util.Vector resourceList
ReadAdrift2
ReadAdrift2(java.lang.String Filename)
throws java.io.IOException
readFile
static jAseaObject readFile(java.lang.String fn)
throws java.io.IOException
- Reads file
If last character in name is 'C' (for .DEC, decompressed)
it reads the file directly
If last character in name is 'f' (for .taf),
it runs the file through a decompresser first.
- Parameters:
fn
- File Name
- Returns:
- read game data
java.io.IOException
main
public static void main(java.lang.String[] args)
readSetProp
void readSetProp(java.util.Hashtable ht,
java.lang.String[] props)
throws java.io.IOException
- Reads in properties of the type given in 'props',
and then sets a field of the appropriate name in 'ht'
- Parameters:
props
- Lists of properties to setht
- Hashtable to store set properties
java.io.IOException
readSetProp
void readSetProp(java.util.Hashtable ht,
java.lang.String prop)
throws java.io.IOException
- Reads in property of the type given in 'prop',
and then sets a field of the appropriate name in 'ht'
The first few characters of a property give the type of the field
to read; the rest give the name of the property to set.
$name --> Type String
#name --> Type Integer
Bname --> Type Boolean
name --> Type
[num]name --> Array of size num
V(type)name --> Integer, followed by that many
objects of type (type)
?test:name1,name2,... --> If the test evaluates to true, then
read and set all those field,
otherwise do nothing.
- Parameters:
prop
- Property to setht
- Hashtable to store set properties
java.io.IOException
readResource
jAseaObject readResource(boolean sound,
boolean graph)
throws java.io.IOException
java.io.IOException