-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathCompressedCdfRecord.java
More file actions
42 lines (37 loc) · 1.07 KB
/
CompressedCdfRecord.java
File metadata and controls
42 lines (37 loc) · 1.07 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
38
39
40
41
42
package uk.ac.bristol.star.cdf.record;
import java.io.IOException;
/**
* Field data for CDF record of type Compressed CDF Record.
*
* @author Mark Taylor
* @since 19 Jun 2013
*/
public class CompressedCdfRecord extends Record {
@CdfField @OffsetField public final long cprOffset;
@CdfField public final long uSize;
@CdfField public final int rfuA;
private final long dataOffset_;
/**
* Constructor.
*
* @param plan basic record information
*/
public CompressedCdfRecord( RecordPlan plan ) throws IOException {
super( plan, "CCR", 10 );
Buf buf = plan.getBuf();
Pointer ptr = plan.createContentPointer();
this.cprOffset = buf.readOffset( ptr );
this.uSize = buf.readOffset( ptr );
this.rfuA = buf.readInt( ptr );
dataOffset_ = ptr.get();
}
/**
* Returns the file offset at which the compressed data in
* this record starts.
*
* @return file offset for start of data field
*/
public long getDataOffset() {
return dataOffset_;
}
}