private static void writeLinkInfo(File file, OutputStream out) throws IOException {
    String target = Utils.readLink(file);
    if (target.isEmpty()) throw new IOException("Invalid link: " + file);
    byte[] bytes = target.getBytes(StandardCharsets.UTF_8);
    out.write(bytes.length);
    out.write(bytes);
  }
private static void writeLinkInfo(File file, OutputStream out)