docs: public static void copy(InputStream source, File target) {
          if (!target.exists()) {
              throw new HazelcastException("The target file doesn't exist " + target.getAbsolutePath());
          }
  
          FileOutputStream out = null;
          try {
              out = new FileOutputStream(target);
              byte[] buff = new byte[8192];
  
              int length;
              while ((length = source.read(buff)) > 0) {
                  out.write(buff, 0, length);
              }
          } catch (Exception e) {
              throw new HazelcastException("Error occurred while copying InputStream", e);
          } finally {
              closeResource(out);
          }
      }