File: CompressedParametersRecord.java

package info (click to toggle)
jcdf 1.2.5%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 572 kB
  • sloc: java: 5,315; makefile: 198; sh: 98
file content (33 lines) | stat: -rw-r--r-- 920 bytes parent folder | download | duplicates (2)
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
package uk.ac.bristol.star.cdf.record;

import java.io.IOException;

/**
 * Field data for CDF record of type Compressed Parameters Record.
 *
 * @author   Mark Taylor
 * @since    19 Jun 2013
 */
public class CompressedParametersRecord extends Record {

    @CdfField public final int cType;
    @CdfField public final int rfuA;
    @CdfField public final int pCount;
    @CdfField public final int[] cParms;

    /**
     * Constructor.
     *
     * @param  plan   basic record information
     */
    public CompressedParametersRecord( RecordPlan plan ) throws IOException {
        super( plan, "CPR", 11 );
        Buf buf = plan.getBuf();
        Pointer ptr = plan.createContentPointer();
        this.cType = buf.readInt( ptr );
        this.rfuA = buf.readInt( ptr );
        this.pCount = buf.readInt( ptr );
        this.cParms = readIntArray( buf, ptr, this.pCount );
        checkEndRecord( ptr );
    }
}