public static boolean  is7BitASCII(String str) {
    
    int i;
    for(i=0;i<str.length();i++){
      if(str.charAt(i)>=0x80) break; // note: change to codePointAt after we switch to java 1.5
    }
    return (i==str.length());
  }