code: private static String getSpaces(int n) {
  
          // avoid negative NegativeArraySizeException in case uri is missing
          n = Math.max(n, 0);
          StringBuffer result = new StringBuffer(n);
          for (; n > 0; n--) {
              result.append(' ');
          }
          return result.toString();
      }
docs: Returns a String of spaces.<p>
  
  @param n the count of spaces
  
  @return a String of spaces