Worldwind public release 0.2.1
[worldwind-tracker.git] / gov / nasa / worldwind / formats / nitfs / UserDefinedImageSubheader.java
blob14f59d1a6ab9ccaac131f540268b906f728e644d
1 package gov.nasa.worldwind.formats.nitfs;
3 import gov.nasa.worldwind.*;
4 import gov.nasa.worldwind.formats.rpf.*;
5 /*
6 Copyright (C) 2001, 2007 United States Government
7 as represented by the Administrator of the
8 National Aeronautics and Space Administration.
9 All Rights Reserved.
12 /**
13 * @author Lado Garakanidze
14 * @version $Id: UserDefinedImageSubheader Mar 31, 2007 9:42:33 PM
16 public class UserDefinedImageSubheader
18 public short getOverflow()
20 return this.overflow;
23 public String getTag()
25 return this.tag;
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;
41 private String tag;
42 private int dataLength;
44 public UserDefinedImageSubheader(java.nio.ByteBuffer buffer) throws NitfsRuntimeException
46 this.overflow = NitfsUtil.getShortNumeric(buffer, 3);
47 this.tag = NitfsUtil.getString(buffer, 6);
48 this.dataLength = NitfsUtil.getShortNumeric(buffer, 5);
50 if(0 < this.dataLength)
52 if(StringUtil.Equals(tag, RpfFrameFileComponents.DATA_TAG))
53 this.rpfFrameFileComponents = new RpfFrameFileComponents(buffer);
54 else
55 throw new NitfsRuntimeException("NitfsReader.UnknownOrUnsupportedUserDefinedImageSubheader");