|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog
uk.ac.leeds.ccg.andyt.projects.moses.io.AbstractDataHandler
public abstract class AbstractDataHandler
Abstract class for handling AbstractDataRecords
| Field Summary | |
|---|---|
protected java.io.File |
_Directory
The workspace directory. |
protected java.io.File |
_File
Formatted File for
AbstractDataRecords. |
protected java.io.RandomAccessFile |
_RandomAccessFile
RandomAccessFile |
protected long |
_RecordLength
For storing the length of an AbstractDataRecord that this
Handler handles in measured in byte units and stored as a
long. |
| Fields inherited from class uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog |
|---|
_Logger, _Logger_FileHandler |
| Constructor Summary | |
|---|---|
AbstractDataHandler()
|
|
| Method Summary | |
|---|---|
java.io.File |
get_Directory()
|
long |
get_RecordLength()
Returns a copy of _RecordLength. |
abstract AbstractDataRecord |
getDataRecord(long RecordID)
|
long |
getNDataRecords()
|
void |
init(java.io.File _Directory)
|
void |
init(java.util.logging.Level aLevel,
java.io.File _Directory)
|
protected void |
load(java.io.File _File)
Set: this._File = _File
this.tRandomAccessFile = new
RandomAccessFile(_File,"r" ) |
protected void |
print(int n,
java.util.Random random)
Prints a random set of n AbstractDataRecords
via System.out.println() |
| Methods inherited from class uk.ac.leeds.ccg.andyt.projects.moses.utilities.AbstractLog |
|---|
init_Logger, init_Logger, init_Logger, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected long _RecordLength
AbstractDataRecord that this
Handler handles in measured in byte units and stored as a
long.
protected java.io.File _File
File for
AbstractDataRecords.
protected java.io.File _Directory
protected transient java.io.RandomAccessFile _RandomAccessFile
RandomAccessFile of _File for
AbstractDataRecords
| Constructor Detail |
|---|
public AbstractDataHandler()
| Method Detail |
|---|
public long get_RecordLength()
_RecordLength.
public java.io.File get_Directory()
public void init(java.util.logging.Level aLevel,
java.io.File _Directory)
public void init(java.io.File _Directory)
protected void load(java.io.File _File)
this._File = _File
this.tRandomAccessFile = new
RandomAccessFile(_File,"r" )
_File - Formatted File containing
AbstractDataRecords.public long getNDataRecords()
AbstractDataRecords in
this.tRandomAccessFilepublic abstract AbstractDataRecord getDataRecord(long RecordID)
RecordID - The RecordID of the AbstractDataRecord to be returned.
AbstractDataRecord for the given RecordID
protected void print(int n,
java.util.Random random)
throws java.io.IOException
n AbstractDataRecords
via System.out.println()
n - the number of AbstractDataRecords to print outrandom - the Random used for selecting
AbstractDataRecords to print
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||