docs: protected static void instrumentJarFile(String pathToFile) throws IOException {
          File jarFile = new File(pathToFile);
          // Use tmp file for output (in the same directory).
          File newFile = File.createTempFile("any", ".jar", jarFile.getParentFile());
          ZipInputStream zis = null;
          ZipOutputStream zos = null;
          try {
              zis = new ZipInputStream(new FileInputStream(jarFile));
              zos = new ZipOutputStream(new FileOutputStream(newFile));
              for (ZipEntry entry = zis.getNextEntry(); entry != null; entry = zis.getNextEntry()) {
                  String name = entry.getName();
                  zos.putNextEntry(new ZipEntry(name));
                  if (name.endsWith(".class")) {
                      // We instrument classfiles and then write them to
                      // new jar.
                      byte[] classfileBuffer = FileUtil.loadBytes(zis, false);
                      byte[] newClassfileBuffer = instrumentClassFile(classfileBuffer);
                      zos.write(newClassfileBuffer);
                  } else {
                      int data;
                      while ((data = zis.read()) != -1) {
                          zos.write(data);
                      }
                  }
                  zos.closeEntry();
              }
          } finally {
              FileUtil.closeAndIgnoreExceptions(zis);
              FileUtil.closeAndIgnoreExceptions(zos);
          }
  
          // Move new jar to old jar.
          // Files.move(newFile, jarFile, StandardCopyOption.REPLACE_EXISTING);
          FileUtil.copyBytes(newFile, jarFile);
          newFile.delete();
      }