code: public static boolean[] parseBooleanArray (String source)
      {
          StringTokenizer tok = new StringTokenizer(source, ",");
          boolean[] vals = new boolean[tok.countTokens()];
          for (int i = 0; tok.hasMoreTokens(); i++) {
              // accept a lone 't' for true for compatibility with toString(boolean[])
              String token = tok.nextToken().trim();
              vals[i] = Boolean.parseBoolean(token) || token.equalsIgnoreCase("t");
          }
          return vals;
      }
docs: Parses an array of booleans from its string representation. The array should be represented
  as a bare list of numbers separated by commas, for example:
  
  <pre>false, false, true, false</pre>