Package gps.garmin.img.structure

Examples of gps.garmin.img.structure.IMG


    private HashMap<SubfileType, FATBlock> fatBlocks;
   
    private boolean alreadyParsed;
   
    protected Parser(String name) {
        img = new IMG();
        img.setName(name);
       
        fatBlocks = new HashMap<SubfileType, FATBlock>();
        alreadyParsed = false;
    }
View Full Code Here


                    });
       
        for (File file : files) {
            Parser parser = new FileParser(file);
            parser.parse();
            IMG img = parser.getIMG();
            Header header = img.getImgHeader();
            PartitionTable partitionTable = header.getPartitionTable();
           
            System.out.println("IMG " + img.getName() + " - " + file.length());
            System.out.println("XOR'd " +header.isXorEd());
            System.out.println("XOR byte " + header.getXorByte());
            System.out.println("Update month " + header.getUpdateMonth());
            System.out.println("Update year " + header.getUpdateYear());
            System.out.println("Checksum " + header.getChecksum());
            System.out.println("Signature " + header.getSignature());
            System.out.println("Creation date " + header.getCreationDate());
            System.out.println("Map file identifier " + header.getMapFileIdentifier());
            System.out.println("Description " + header.getDescription() + "...");
            System.out.println("Exponent1 " + header.getBlockSizeExponent1());
            System.out.println("Exponent2 " + header.getBlockSizeExponent2());
            System.out.println("Boot " + partitionTable.getBoot());
            System.out.println("Start head " + partitionTable.getStartHead());
            System.out.println("Start sector " + partitionTable.getStartSector());
            System.out.println("Start cylinder " + partitionTable.getStartCylinder());
            System.out.println("System type " + partitionTable.getSystemType());
            System.out.println("End head " + partitionTable.getEndHead());
            System.out.println("End sector " + partitionTable.getEndSector());
            System.out.println("End cylinder " + partitionTable.getEndCylinder());
            System.out.println("Rel sectors " + partitionTable.getRelSectors());
            System.out.println("Number of sectors " + partitionTable.getNumberOfSectors());
            System.out.println("Block size " + header.getFatBlockSize());
            System.out.println("Header size " + header.getHeaderSize());
            System.out.println("First subfile offset " + header.getFirstSubfileOffset());
            System.out.println("Block sequence count " + header.getBlockSequence().size());
            System.out.println("Blocks total size " + header.getFatBlocksTotalSize());
           
            for (FATBlock fatBlock : header.getFatBlocks()) {
                System.out.println("  Block type " + fatBlock.getType());
                System.out.println("    Subfile name " + fatBlock.getSubfileName());
                System.out.println("    Subfile type " + fatBlock.getSubfileType());
                System.out.println("    Subfile part " + fatBlock.getSubfilePart());
                System.out.println("    Subfile size " + fatBlock.getSubfileSizeInBytes());
                System.out.println("    Subfile offset " + fatBlock.getSubfileOffset());
                System.out.println("    Block sequence count " + fatBlock.getBlockSequence().size());
            }
           
            for (Subfile subfile : img.getSubfiles()) {
                System.out.println("        Subfile type " + subfile.getCommonHeader().getType());
                System.out.println("          Headers length " + subfile.getCommonHeader().getHeadersLength());
                System.out.println("          Offset " + subfile.getOffset());
                switch (subfile.getCommonHeader().getType()) {
                    case TRE:
View Full Code Here

    private void imgButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_imgButtonActionPerformed
        try {
            Parser parser = new FileParser(new File(imgPath.getText()));
            parser.parse();
            IMG img = parser.getIMG();
           
            imgName.setText(img.getName());
           
            Header header = img.getImgHeader();
           
            xored.setSelected(header.isXorEd());
            xorByte.setText("0x" + Integer.toHexString(header.getXorByte()));
           
            for (Subfile subfile : img.getSubfiles()) {
                switch (subfile.getCommonHeader().getType()) {
                    case TRE:
                        SubfileTRE treSubfile = (SubfileTRE) subfile;

                        addSubdivision(rootNode, treSubfile.getFirstSubdivision());
View Full Code Here

TOP

Related Classes of gps.garmin.img.structure.IMG

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.