code: protected ByteBuffer findApkSignBlock() throws IOException {
          ByteBuffer buffer = fileData().order(ByteOrder.LITTLE_ENDIAN);
          int len = buffer.limit();
  
          // first find zip end of central directory entry
          if (len < 22) {
              // should not happen
              throw new RuntimeException("Not zip file");
          }
          int maxEOCDSize = 1024 * 100;
          EOCD eocd = null;
          for (int i = len - 22; i > Math.max(0, len - maxEOCDSize); i--) {
              int v = buffer.getInt(i);
              if (v == EOCD.SIGNATURE) {
                  Buffers.position(buffer, i + 4);
                  eocd = new EOCD();
                  eocd.setDiskNum(Buffers.readUShort(buffer));
                  eocd.setCdStartDisk(Buffers.readUShort(buffer));
                  eocd.setCdRecordNum(Buffers.readUShort(buffer));
                  eocd.setTotalCDRecordNum(Buffers.readUShort(buffer));
                  eocd.setCdSize(Buffers.readUInt(buffer));
                  eocd.setCdStart(Buffers.readUInt(buffer));
                  eocd.setCommentLen(Buffers.readUShort(buffer));
              }
          }
  
          if (eocd == null) {
              return null;
          }
  
          int magicStrLen = 16;
          long cdStart = eocd.getCdStart();
          // find apk sign block
          Buffers.position(buffer, cdStart - magicStrLen);
          String magic = Buffers.readAsciiString(buffer, magicStrLen);
          if (!magic.equals(ApkSigningBlock.MAGIC)) {
              return null;
          }
          Buffers.position(buffer, cdStart - 24);
          int blockSize = Unsigned.ensureUInt(buffer.getLong());
          Buffers.position(buffer, cdStart - blockSize - 8);
          long size2 = Unsigned.ensureULong(buffer.getLong());
          if (blockSize != size2) {
              return null;
          }
          // now at the start of signing block
          return Buffers.sliceAndSkip(buffer, blockSize - magicStrLen);
      }
docs: Create ApkSignBlockParser for this apk file.
  
  @return null if do not have sign block