public static String checkTileDataIntegrity(final String fileName, final FileInputStream fis) {
        PhysicalFile pf = null;
        try {
            final DataBuffers dataBuffers = new DataBuffers();
            pf = new PhysicalFile(fileName, fis, dataBuffers, -1);
            final int div = pf.divisor;
            for (int lonDegree = 0; lonDegree < 5; lonDegree++) { // doesn't really matter..
                for (int latDegree = 0; latDegree < 5; latDegree++) { // ..where on earth we are
                    final OsmFile osmf = new OsmFile(pf, lonDegree, latDegree, dataBuffers);
                    if (osmf.hasData()) {
                        for (int lonIdx = 0; lonIdx < div; lonIdx++) {
                            for (int latIdx = 0; latIdx < div; latIdx++) {
                                osmf.createMicroCache(lonDegree * div + lonIdx, latDegree * div + latIdx, dataBuffers, null, null, MicroCache.debug, null);
                            }
                        }
                    }
                }
            }
        } catch (IllegalArgumentException iae) {
            return iae.getMessage();
        } catch (Exception e) {
            return e.toString();
        } finally {
            IOUtils.closeQuietly(pf);
        }
        return null;
    }
Checks the integrity of the file using the build-in checksums.
<br>
* Provided FileInputStream will be closed
* Provided fileName is just for logging purposes

@return the error message if file corrupt, else null
main/src/main/java/cgeo/geocaching/brouter/mapaccess/PhysicalFile.java