1 package gov
.nasa
.worldwind
.formats
.rpf
;
3 import gov
.nasa
.worldwind
.formats
.nitfs
.*;
5 Copyright (C) 2001, 2007 United States Government
6 as represented by the Administrator of the
7 National Aeronautics and Space Administration.
12 * @author Lado Garakanidze
13 * @version $Id: RpfHeaderSection Apr 4, 2007 4:37:01 PM lado
15 class RpfHeaderSection
17 public static final String DATA_TAG
= "RPFHDR";
19 public boolean endianIndicator
;
20 public short headerLength
;
21 public String filename
;
22 public short updateIndicator
; // new | replacement | update
23 public String govSpecNumber
;
24 public String govSpecDate
;
25 public String securityClass
;
26 public String securityCountryCode
;
27 public String securityReleaseMark
;
28 public int locationSectionLocation
;
30 public RpfHeaderSection(java
.nio
.ByteBuffer buffer
)
32 this.endianIndicator
= ((byte) 0 != buffer
.get()); // reads 1 byte, 0 for big endian
33 this.headerLength
= buffer
.getShort(); // reads 2 bytes
34 this.filename
= NitfsUtil
.getString(buffer
, 12);
35 this.updateIndicator
= NitfsUtil
.getByteAsShort(buffer
); // reads 1 byte (short)
36 this.govSpecNumber
= NitfsUtil
.getString(buffer
, 15);
37 this.govSpecDate
= NitfsUtil
.getString(buffer
, 8);
38 this.securityClass
= NitfsUtil
.getString(buffer
, 1);
39 this.securityCountryCode
= NitfsUtil
.getString(buffer
, 2);
40 this.securityReleaseMark
= NitfsUtil
.getString(buffer
, 2);
41 this.locationSectionLocation
= buffer
.getInt(); // read 4 bytes (int)