rpfheadersection.java

来自「world wind java sdk 源码」· Java 代码 · 共 44 行

JAVA
44
字号
package gov.nasa.worldwind.formats.rpf;

import gov.nasa.worldwind.formats.nitfs.NITFSUtil;
/*
Copyright (C) 2001, 2007 United States Government
as represented by the Administrator of the
National Aeronautics and Space Administration.
All Rights Reserved.
*/

/**
 * @author Lado Garakanidze
 * @version $Id: RpfHeaderSection Apr 4, 2007 4:37:01 PM lado
 */
class RPFHeaderSection
{
    public static final String DATA_TAG = "RPFHDR";

    public boolean  endianIndicator;
    public short    headerLength;
    public String   filename;
    public short    updateIndicator; // new | replacement | update
    public String   govSpecNumber;
    public String   govSpecDate;
    public String   securityClass;
    public String   securityCountryCode;
    public String   securityReleaseMark;
    public int      locationSectionLocation;

    public RPFHeaderSection(java.nio.ByteBuffer buffer)
    {
        this.endianIndicator = ((byte) 0 != buffer.get());         // reads 1 byte, 0 for big endian
        this.headerLength = buffer.getShort();                     // reads 2 bytes
        this.filename = NITFSUtil.getString(buffer, 12);
        this.updateIndicator = NITFSUtil.getByteAsShort(buffer);       // reads 1 byte (short)
        this.govSpecNumber = NITFSUtil.getString(buffer, 15);
        this.govSpecDate = NITFSUtil.getString(buffer, 8);
        this.securityClass = NITFSUtil.getString(buffer, 1);
        this.securityCountryCode = NITFSUtil.getString(buffer, 2);
        this.securityReleaseMark = NITFSUtil.getString(buffer, 2);
        this.locationSectionLocation = buffer.getInt();            // read 4 bytes (int)
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?