code: private static boolean validateLocalFileRecord(FileChannel channel, long startLocRecord, long compressedSize) throws IOException {
  
          ByteBuffer lfhBuffer = getByteBuffer(LOCLEN);
          read(lfhBuffer, channel, startLocRecord);
          if (lfhBuffer.limit() < LOCLEN || getUnsignedInt(lfhBuffer, 0) != LOCSIG) {
              return false;
          }
  
          if (compressedSize == -1) {
              // We can't further evaluate
              return true;
          }
  
          int fnLen = getUnsignedShort(lfhBuffer, LOC_FILENAMELEN);
          int extFieldLen = getUnsignedShort(lfhBuffer, LOC_EXTFLDLEN);
          long nextSigPos = startLocRecord + LOCLEN + compressedSize + fnLen + extFieldLen;
  
          read(lfhBuffer, channel, nextSigPos);
          long header = getUnsignedInt(lfhBuffer, 0);
          return header == LOCSIG || header == EXTSIG || header == CENSIG;
      }
docs: Checks that the data starting at startLocRecord looks like a local file record header.
  
  @param channel        the channel
  @param startLocRecord offset into channel of the start of the local record
  @param compressedSize expected compressed size of the file, or -1 to indicate this isn't known