|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.farafin.snEADy.inOut.C_RecordFileWriter
public class C_RecordFileWriter
reads a record file:
file scheme:
for each gameCycle:
what is stored (consumtion)
- Number bytes (2Byte)
- Nnumber of playfield changes (1Byte)
- Playfield changes (3 Byte each)
...
- Player Nr and status changes (1 Byte)
= Player Number (4 bit)
+ speed changed? (1 bit)
+ length changed? (1 bit)
+ Points changed? (1 bit)
+ Status changed? (1 bit)
- playerdata (max 7 Byte)
= new speed (1 Byte) [only if change bit is 1]
+ new Length (2 Byte) [only if change bit is 1]
+ new points (2 Byte) [only if change bit is 1]
+ new Status (1 Byte) [only if change bit is 1]
+ head move direction (1 Byte)
- if player Nr == 15: new Exit Time (8 Byte) + new SDTime (8 Byte) = 17 Byte
| Field Summary | |
|---|---|
private java.io.File |
binFile
Comment for logFile |
private java.util.Vector |
buffer
the buffer of data |
private java.lang.String |
header
Comment for header |
| Constructor Summary | |
|---|---|
C_RecordFileWriter(java.lang.String fileName)
constructor |
|
C_RecordFileWriter(java.lang.String root,
java.lang.String fileName)
|
|
| Method Summary | |
|---|---|
void |
addGameCycle(byte[] cycle)
|
void |
saveAndCloseFile()
safes the stored lines to the file and closes it. |
void |
storeHeader(java.lang.String head)
stors the head |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private java.io.File binFile
logFile
private java.util.Vector buffer
private java.lang.String header
header
| Constructor Detail |
|---|
public C_RecordFileWriter(java.lang.String fileName)
fileName -
public C_RecordFileWriter(java.lang.String root,
java.lang.String fileName)
root - fileName - | Method Detail |
|---|
public void storeHeader(java.lang.String head)
head - public void addGameCycle(byte[] cycle)
cycle - public void saveAndCloseFile()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||