|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectbinaryFileStorage.BinaryInputStream
public class BinaryInputStream
Used to read data back from a binary data file and either send it off to the associated PamDataBlock or hand it back to the BinaryStore controller, e.g. for writing into a new file if data are being updated.
| Field Summary | |
|---|---|
private BinaryFooter |
binaryFooter
|
private BinaryStore |
binaryStore
|
private java.io.DataInputStream |
inputStream
|
private long |
lastObjectTime
|
private PamDataBlock |
pamDataBlock
|
private int |
unitsRead
|
| Constructor Summary | |
|---|---|
BinaryInputStream(BinaryStore binaryStore,
PamDataBlock pamDataBlock)
|
|
| Method Summary | |
|---|---|
protected void |
closeFile()
|
protected void |
finalize()
|
BinaryFooter |
getBinaryFooter()
|
long |
getLastObjectTime()
|
int |
getUnitsRead()
|
protected boolean |
openFile(java.io.File inputFile)
Open an input file for reading. |
protected BinaryHeader |
readHeader()
Reads the binary header from the file. |
protected BinaryObjectData |
readNextObject()
Read the next object from the file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private PamDataBlock pamDataBlock
private BinaryStore binaryStore
private java.io.DataInputStream inputStream
private BinaryFooter binaryFooter
private int unitsRead
private long lastObjectTime
| Constructor Detail |
|---|
public BinaryInputStream(BinaryStore binaryStore,
PamDataBlock pamDataBlock)
| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwableprotected boolean openFile(java.io.File inputFile)
inputFile - file to open.
protected void closeFile()
protected BinaryHeader readHeader()
protected BinaryObjectData readNextObject()
The object data will be packed up in a BinaryObjectData which will have various fields filled in depending on the type of object.
null will be returned when there is an eof or when the file footer has been identified.
The calling function can check the file was complete by testing whether or not the file footer is null.
public BinaryFooter getBinaryFooter()
public int getUnitsRead()
public long getLastObjectTime()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||