private static boolean[] createSafeOctets(String safeChars){
  int maxChar=-1;
  char[] safeCharArray=safeChars.toCharArray();
  for (  char c : safeCharArray) {
    maxChar=Math.max(c,maxChar);
  }
  boolean[] octets=new boolean[maxChar + 1];
  for (  char c : safeCharArray) {
    octets[c]=true;
  }
  return octets;
}

private static boolean [ ] createSafeOctets ( String safeChars ) { int maxChar = - 1 ; char [ ] safeCharArray = safeChars . toCharArray ( ) ; for ( char c : safeCharArray ) { maxChar = Math . max ( c , maxChar ) ; } boolean [ ] octets = new boolean [ maxChar + 1 ] ; for ( char c : safeCharArray ) { octets [ c ] = true ; } return octets ; }
creates a boolean array with entries corresponding to the character values specified in safechars set to true . the array is as small as is required to hold the given character information .
