public class IOHelper extends Object
| Constructor and Description |
|---|
IOHelper()
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
ApproximationFileEntry |
readApproximation(DataInputStream in)
Reads an approximation
|
ApproximationFileEntry |
readApproximation(RandomAccessFile rand)
Reads an approximation
|
VAFileParams |
readHeader(RandomAccessFile rand)
Reads a header
|
VectorFileEntry |
readRecord(DataInputStream in)
Reads a record
|
VectorFileEntry |
readRecord(RandomAccessFile rand)
Reads a record
|
void |
setIDLength(int idlength)
Sets the property value
|
void |
setVectorLength(int vectorlength)
Sets the property value
|
void |
skipHeader(RandomAccessFile rand)
Skips the header
|
void |
writeApproximation(ApproximationFileEntry entry,
RandomAccessFile rand)
Writes an Approximation
|
void |
writeHeader(VAFileParams params,
RandomAccessFile rand)
Writes the header
|
void |
writeRecord(VectorFileEntry entry,
RandomAccessFile rand)
Writes a record
|
public void setIDLength(int idlength)
throws Exception
idlength - The property valueException - An errorpublic void setVectorLength(int vectorlength)
throws Exception
vectorlength - The property valueException - An errorpublic void writeHeader(VAFileParams params, RandomAccessFile rand) throws Exception
params - The VAFile header paramsrand - The pointerException - An errorpublic void skipHeader(RandomAccessFile rand) throws Exception
rand - The pointerException - An errorpublic VAFileParams readHeader(RandomAccessFile rand) throws Exception
rand - The pointerException - An errorpublic void writeApproximation(ApproximationFileEntry entry, RandomAccessFile rand) throws Exception
entry - The entryrand - The pointerException - An errorpublic ApproximationFileEntry readApproximation(RandomAccessFile rand)
rand - The pointerpublic ApproximationFileEntry readApproximation(DataInputStream in)
in - The pointerpublic void writeRecord(VectorFileEntry entry, RandomAccessFile rand) throws Exception
entry - The entryrand - The pointerException - An errorpublic VectorFileEntry readRecord(RandomAccessFile rand)
rand - The pointerpublic VectorFileEntry readRecord(DataInputStream in)
in - The pointerCopyright © 2014. All Rights Reserved.