code: public static String removeWhitespace(String input) {
          StringBuilder result = new StringBuilder();
          if (input != null) {
              StringTokenizer st = new StringTokenizer(input);
              while (st.hasMoreTokens()) {
                  result.append(st.nextToken());
              }
          }
          return result.toString();
      }
docs: "Flattens" a string by removing all whitespace (space, tab, linefeed,
  carriage return, and formfeed). This uses StringTokenizer and the
  default set of tokens as documented in the single arguement constructor.
  
  @param input a String to remove all whitespace.
  @return a String that has had all whitespace removed.