code: @Override
    public int getFileCrc(Path f) throws IOException {
      File p2f = pathToFile(f);
      DataChecksum checksum = DataChecksum.newDataChecksum(DataChecksum.CHECKSUM_CRC32, 1);
      byte[] buf = new byte[1024];
      DataInputStream streamIn = new DataInputStream(new BufferedInputStream(
          new FileInputStream(p2f), 128 * 1024));
      try {
        while (true) {
          int bytesRead = streamIn.read(buf);
          if (bytesRead == -1) {
            break;
          } else
            checksum.update(buf, 0, bytesRead);
        }
        return (int) checksum.getValue();
      } finally {
        IOUtils.closeStream(streamIn);
      }
    }
docs: {@inheritDoc}