// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
import dk.vajhoej.record.RecordException;
import dk.vajhoej.record.StructReader;

public class CStruct {
    public static void main(String[] args) throws RecordException {
        byte[] b = { 7, 0, 0, 0, 0x12, 0, 3, 0 };
        StructReader sr = new StructReader(b);
        Data o = sr.read(Data.class);
        System.out.println(o.getLiv() + " " + o.getBv1() + " " + o.getBv2() + " " + o.getSiv());
    }
}
