|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.bristol.star.cdf.record.RecordFactory
public class RecordFactory
Turns bytes in a buffer into typed and populated CDF records.
Constructor Summary | |
---|---|
RecordFactory(int nameLeng)
Constructor. |
Method Summary | ||
---|---|---|
Record |
createRecord(Buf buf,
long offset)
Creates a Record object from a given position in a buffer. |
|
|
createRecord(Buf buf,
long offset,
java.lang.Class<R> clazz)
Creates a Record object with a known type from a given position in a buffer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RecordFactory(int nameLeng)
nameLeng
- number of bytes in variable and attribute names;
appears to be 64 for pre-v3 and 256 for v3Method Detail |
---|
public Record createRecord(Buf buf, long offset) throws java.io.IOException
buf
- byte bufferoffset
- start of record in buf
java.io.IOException
public <R extends Record> R createRecord(Buf buf, long offset, java.lang.Class<R> clazz) throws java.io.IOException
getRecord
method, and attempts to cast the result, throwing a
CdfFormatException if it has the wrong type.
buf
- byte bufferoffset
- start of record in bufclazz
- record class asserted for the result
CdfFormatException
- if the record found there turns out
not to be of type clazz
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |