1 package gov
.nasa
.worldwind
.formats
.nitfs
;
3 import gov
.nasa
.worldwind
.formats
.rpf
.RPFFrameFileComponents
;
4 import gov
.nasa
.worldwind
.util
.StringUtil
;
6 Copyright (C) 2001, 2007 United States Government
7 as represented by the Administrator of the
8 National Aeronautics and Space Administration.
13 * @author Lado Garakanidze
14 * @version $Id: UserDefinedImageSubheader Mar 31, 2007 9:42:33 PM
16 public class UserDefinedImageSubheader
18 public short getOverflow()
23 public String
getTag()
28 public int getDataLength()
30 return this.dataLength
;
33 public RPFFrameFileComponents
getRPFFrameFileComponents()
35 return this.rpfFrameFileComponents
;
38 private RPFFrameFileComponents rpfFrameFileComponents
= null;
40 private short overflow
;
42 private int dataLength
;
44 public UserDefinedImageSubheader(java
.nio
.ByteBuffer buffer
) throws NITFSRuntimeException
{
45 this.overflow
= NITFSUtil
.getShortNumeric(buffer
, 3);
46 this.tag
= NITFSUtil
.getString(buffer
, 6);
47 this.dataLength
= NITFSUtil
.getShortNumeric(buffer
, 5);
49 if(0 < this.dataLength
)
51 if(StringUtil
.Equals(tag
, RPFFrameFileComponents
.DATA_TAG
))
52 this.rpfFrameFileComponents
= new RPFFrameFileComponents(buffer
);
54 throw new NITFSRuntimeException("NITFSReader.UnknownOrUnsupportedUserDefinedImageSubheader");