private void addFile(Path file, BasicFileAttributes attrs, String name, long explicitTimestamp) throws IOException {
    try (InputStream source = Files.newInputStream(file)) {
      long timestamp = explicitTimestamp == -1 ? attrs.lastModifiedTime().toMillis() : explicitTimestamp;
      String symlinkTarget = attrs.isSymbolicLink() ? Files.readSymbolicLink(file).toString() : null;
      writeFileEntry(name, source, attrs.size(), timestamp, mode(file), symlinkTarget);
    }
  }
private void addFile(Path file, BasicFileAttributes attrs, String name, long explicitTimestamp)