Package gps.garmin

Source Code of gps.garmin.TestXor

/*
* TestXor.java
*
* Created on May 4, 2007, 11:36 PM
*
* To change this template, choose Tools | Template Manager
* and open the template in the editor.
*/

package gps.garmin;

import gps.garmin.img.DecryptFileParser;
import gps.garmin.img.FileParser;
import gps.garmin.img.Parser;
import java.io.File;
import java.io.FilenameFilter;

/**
*
* @author aranzuglia
*/
public class TestXor {
   
    /** Creates a new instance of TestXor */
    public TestXor() {
    }
   
    public static void main(String[] args) throws Exception {
        String dir = "/usr/local/development/Garmin IMG/src/gps/garmin/test";
        //String dir = "/media/hda1/Archivos de programa/Mapear_3";
        File[] files =
            new File(dir).
                listFiles(
                    new FilenameFilter() {
                        public boolean accept(File dir, String name) {
                            return (name.endsWith(".img") || name.endsWith(".IMG")) && name.length() < 20;
                        }
                    });
       
        for (File file : files) {
            Parser parser = new DecryptFileParser(file, new File(file.getPath() + ".xor"));
            parser.parse();
        }
    }
   
}
TOP

Related Classes of gps.garmin.TestXor

TOP
Copyright © 2018 www.massapi.com. 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.