public static CartridgeFile read (SeekableFile source, FileHandle savefile)
    throws IOException {
        CartridgeFile cf = new CartridgeFile();
        cf.source = source;

        if (!cf.fileOk()) throw new IOException("invalid cartridge file");

        cf.scanOffsets();
        cf.scanHeader();

        cf.savegame = new Savegame(savefile);

        return cf;
    }
Read the specified file and return a corresponding CartridgeFile object.

@param source file representing the cartridge
@param savefile save file corresponding to this cartridge
@return a CartridgeFile object corresponding to source
@throws IOException
main/src/main/java/cgeo/geocaching/wherigo/openwig/formats/CartridgeFile.java