if (buffer.getInt(pos) == ENDSIG) {
                break;
            }
        }
        if (pos < 0) {
            throw new ZipException(
                "central directory not found, probably not a zip file");
        }
        final int count = buffer.getShort(pos + ENDTOT);
//        System.out.println("Count=" + count);
        final int centralOffset = buffer.getInt(pos + ENDOFF);
//        System.out.println("centralOffset=" + centralOffset);
        HashMap<String, ByteBuffer> entries = new HashMap<String, ByteBuffer>(
            count + count / 2);
        buffer.position(centralOffset);
        byte[] strBuf = new byte[16];
        for (int i = 0; i < count; i++) {
            pos = buffer.position();
            buffer.position(buffer.position() + CENHDR);
            if (buffer.getInt(pos + 0) != CENSIG) {
                throw new ZipException("Wrong Central Directory signature "
                    + NumberUtils.hex(buffer.getInt(pos + 0)));
            }
            int method = buffer.getShort(pos + CENHOW);
            int dostime = buffer.getInt(pos + CENTIM);