Package com.bbn.openmap.io

Examples of com.bbn.openmap.io.BinaryFile


            Debug.output("Usage: java RpfColortable <path to RPF frame>");
            return;
        }

        File file = new File(args[0]);
        BinaryFile binFile = null;
        try {
            binFile = new BinaryBufferedFile(file);
        } catch (FileNotFoundException e) {
            Debug.error("RpfHeader: file " + args[0] + " not found");
            System.exit(1);
View Full Code Here


    // Debug.message("gc", "RpfFrame: getting GC'd");
    // }

    protected boolean initFile(String framePath) {
        try {
            BinaryFile binFile = new BinaryBufferedFile(framePath);
            read(binFile);
            binFile.close();
        } catch (FileNotFoundException e) {
            Debug.error("RpfFrame: file " + framePath + " not found");
            valid = false;
        } catch (IOException ioe) {
            Debug.error("RpfFrame: File IO Error while handling NITF header:\n"
View Full Code Here

     * Load the colortable with the colors from a particular frame file. Not
     * needed, really, since the frame file is now loading it's own colortable
     * at loadtime.
     */
    public static Color[] getColors(String framePath, RpfColortable ct) {
        BinaryFile binFile = null;
        try {
            binFile = new BinaryBufferedFile(framePath);
            // binFile = new BinaryFile(framePath);
            RpfFileSections rfs = new RpfFileSections();
            RpfHeader head = new RpfHeader();

            head.read(binFile);
            binFile.seek(head.locationSectionLocation);
            rfs.parse(binFile);

            Color[] ret = rfs.parseColorSection(binFile, ct);

            binFile.close();
            return ret;
        } catch (FileNotFoundException e) {
            Debug.error("RpfFrame: getColortable(): file " + framePath
                    + " not found");
        } catch (IOException ioe) {
View Full Code Here

            if (Debug.debugging("maketoc")) {
                Debug.output("MakeToc: frame number " + i + ", " + framePath);
            }

            try {
                BinaryFile binFile = new BinaryBufferedFile(framePath);

                // Frame file names are 8.3 notation, might want to
                // check
                // that here, to blow off dummy files.
                String fn = binFile.getName();
                if (fn.length() != 12) {
                    // Not a RPF Frame file
                    if (Debug.debugging("maketoc")) {
                        Debug.error("MakeToc: " + framePath
                                + " is not a RPF image file - ignoring");
                    }
                    continue;
                }

                RpfFileSections rfs = new RpfFileSections();

                binFile.seek(0);

                if (!head.read(binFile)) {
                    // Not a RPF Frame file
                    if (Debug.debugging("maketoc")) {
                    Debug.error("MakeToc: " + framePath
                                + " is not a RPF image file - ignoring");
                    }
                    continue;
                }

                binFile.seek(head.locationSectionLocation);

                rfs.parse(binFile);
                coverage = rfs.parseCoverageSection(binFile);

                if (coverage == null) {
                    Debug.error("MakeToc: error reading coverage section for "
                            + framePath + ", (file " + i + ") skipping");

                    binFile.close();
                    continue;
                }

                if (Debug.debugging("maketocframedetail")) {
                    Debug.output("MakeToc.organizeFrames: coverage section for "
                            + framePath + ", " + coverage);
                }

                binFile.close();
                binFile = null;

            } catch (FileNotFoundException e) {
                Debug.error("MakeToc: " + framePath
                        + " not found, being ignored.");
View Full Code Here

     * @return a RpfAttributes object.
     */
    public static RpfAttributes getAttributes(String filename)
            throws IOException, FileNotFoundException {

        BinaryFile binFile = new BinaryBufferedFile(filename);

        RpfHeader head = new RpfHeader();
        head.read(binFile);

        RpfAttributes att = getAttributes(binFile);
        binFile.close();
        head = null;
        return att;
    }
View Full Code Here

        Debug.output("DTEDFrameACC: using frame " + args[0]);

        java.io.File file = new java.io.File(args[0]);

        try {
            BinaryFile binFile = new BinaryBufferedFile(file);

            // BinaryFile binFile = new BinaryFile(file);
            DTEDFrameACC dfa = new DTEDFrameACC(binFile);

            Debug.output(dfa.toString());
View Full Code Here

        Debug.output("DTEDFrameUHL: using frame " + args[0]);

        java.io.File file = new java.io.File(args[0]);

        try {
            BinaryFile binFile = new BinaryBufferedFile(file);

            //        BinaryFile binFile = new BinaryFile(file);
            DTEDFrameUHL dfu = new DTEDFrameUHL(binFile);

            Debug.output(dfu.toString());
View Full Code Here

    protected DbfHandler() {
        defaultDA = new DrawingAttributes();
    }

    public DbfHandler(String dbfFilePath) throws IOException, FormatException {
        this(new BinaryFile(dbfFilePath));
    }
View Full Code Here

        java.io.File file = new java.io.File(args[0]);

        try {

            BinaryFile binFile = new BinaryBufferedFile(file);
            //          BinaryFile binFile = new BinaryFile(file);
            DTEDFrameDSI dfd = new DTEDFrameDSI(binFile);
            Debug.output(dfd.toString());

        } catch (java.io.FileNotFoundException e) {
View Full Code Here

TOP

Related Classes of com.bbn.openmap.io.BinaryFile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.