public int getDataInputForSubIdx(final int subIdx, final byte[] iobuffer) throws IOException {
        final int startPos = getPosIdx(subIdx - 1);
        final int endPos = getPosIdx(subIdx);
        final int size = endPos - startPos;
        if (size > 0 && size <= iobuffer.length) {
            this.rafile.readFully(fileOffset + startPos, size, iobuffer);
        }
        return size;
    }
cache for a single square

@author ab
main/src/main/java/cgeo/geocaching/brouter/mapaccess/OsmFile.java