code: public static String quote(String arg)
     {
        StringBuilder buf = new StringBuilder(2 + arg.length() * 2);
        quote(buf, arg);
        return buf.toString();
     }
docs: Given a string X, this function returns a string that, when passed through
  the Windows implementation of Java's {@link Runtime#exec(String[])} or
  {@link java.lang.ProcessBuilder}, will appear to the spawned process as X.
  
  @param arg
  The argument to quote.
  
  @return
  The quote version of 'arg'.