Worldwind public release 0.2
[worldwind-tracker.git] / gov / nasa / worldwind / formats / rpf / RpfFileComponents.java
blobb35a935bb3dc6dcdf5d4454bb200890fb418ba9e
1 package gov.nasa.worldwind.formats.rpf;
2 /*
3 Copyright (C) 2001, 2007 United States Government
4 as represented by the Administrator of the
5 National Aeronautics and Space Administration.
6 All Rights Reserved.
7 */
9 /**
10 * @author Lado Garakanidze
11 * @version $Id: RpfFileComponents Apr 4, 2007 5:53:04 PM lado
13 public class RpfFileComponents
15 private java.nio.ByteBuffer buffer;
17 private RpfHeaderSection headerSection;
18 private RpfLocationSection locationSection;
20 public RpfFileComponents(java.nio.ByteBuffer buffer)
22 this.buffer = buffer;
23 this.headerSection = new RpfHeaderSection(buffer);
25 buffer.position(this.headerSection.locationSectionLocation);
26 this.locationSection = new RpfLocationSection(buffer);
30 public RpfHeaderSection getRpfHeaderSection()
32 return this.headerSection;
35 public RpfFrameFileIndexSection getRpfFrameFileIndexSection()
37 if( 0 < locationSection.getFrameFileIndexSectionSubheaderLength())
39 this.buffer.position(locationSection.getFrameFileIndexSectionSubheaderLocation());
40 return new RpfFrameFileIndexSection(buffer);
42 return null;