int (ByteBuffer mappedBuffer) { int headerOffset = (int)(offsets >> 32); int start = headerOffset + 28; // read actual extra field length int extraFieldLength = mappedBuffer.getShort(start) & 0xffff; if (extraFieldLength > 128) { // assert just to be sure that we don't read a lot of data in case of some error in zip file or our impl throw new UnsupportedOperationException( "extraFieldLength expected to be less than 128 bytes but " + extraFieldLength + " (name=" + name + ")"); } int nameLengthInBytes = (int)offsets; int result = start + 2 + nameLengthInBytes + extraFieldLength; dataOffset = result; return result; }