-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathVariableIndexRecord.java
More file actions
37 lines (33 loc) · 1.13 KB
/
VariableIndexRecord.java
File metadata and controls
37 lines (33 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package uk.ac.bristol.star.cdf.record;
import java.io.IOException;
/**
* Field data for CDF record of type Variable Index Record.
*
* @author Mark Taylor
* @since 19 Jun 2013
*/
public class VariableIndexRecord extends Record {
@CdfField @OffsetField public final long vxrNext;
@CdfField public final int nEntries;
@CdfField public final int nUsedEntries;
@CdfField public final int[] first;
@CdfField public final int[] last;
@CdfField @OffsetField public final long[] offset;
/**
* Constructor.
*
* @param plan basic record information
*/
public VariableIndexRecord( RecordPlan plan ) throws IOException {
super( plan, "VXR", 6 );
Buf buf = plan.getBuf();
Pointer ptr = plan.createContentPointer();
this.vxrNext = buf.readOffset( ptr );
this.nEntries = buf.readInt( ptr );
this.nUsedEntries = buf.readInt( ptr );
this.first = readIntArray( buf, ptr, this.nEntries );
this.last = readIntArray( buf, ptr, this.nEntries );
this.offset = readOffsetArray( buf, ptr, this.nEntries );
checkEndRecord( ptr );
}
}