Constructor and Description |
---|
Record() |
Record(long offset)
Create an instance with a byte offset defined.
|
Modifier and Type | Method and Description |
---|---|
void |
dump()
Display a description of the record.
|
long |
getOffset()
Retrieve the byte offset.
|
long |
getSize()
Retrieve the size in bytes for the record.
|
int |
getType()
Get the record type.
|
void |
mimic(Record base)
Copy of base information from one Record to this record.
|
long |
read(RandomAccessFile in)
Read the contents of a Record from an input stream.
|
String |
readDataAsString(RandomAccessFile in,
int dataType,
int length)
Read a data value based on the passed data type and return a String.
|
double |
readDataValue(RandomAccessFile in,
int dataType)
Read a data value based on the passed data type.
|
String |
readStringValue(RandomAccessFile in,
int dataType,
int length)
Read a data value based on the passed data type.
|
void |
setOffset(long offset)
Set the byte offset for the record.
|
void |
setSize(long size)
Set the size in bytes for the record.
|
void |
setType(int type)
Set the type of record.
|
public Record()
public Record(long offset)
offset
- the byte offset for the record.public long read(RandomAccessFile in) throws IOException
in
- the input stream to read from.IOException
- if any reading error occurs.public String readDataAsString(RandomAccessFile in, int dataType, int length) throws IOException
in
- the input stream to read from.dataType
- the data type of the value.length
- the number of characters to read.IOException
- if any reading error occurs.public double readDataValue(RandomAccessFile in, int dataType) throws IOException
in
- the input stream to read from.dataType
- the data type of the value.IOException
- if any reading error occurs.public String readStringValue(RandomAccessFile in, int dataType, int length) throws IOException
in
- the input stream to read from.dataType
- the data type of the value.length
- the number of characters to read.IOException
- if any reading error occurs.public void mimic(Record base)
base
- the Record to copy from.public void dump()
public void setOffset(long offset)
offset
- the byte offset.public long getOffset()
public void setSize(long size)
size
- the size in bytes for the record.public long getSize()
public void setType(int type)
Constant
for available types.type
- the record type.public int getType()
Copyright © 2014-2015 Regents University of California. All Rights Reserved.