code: public static boolean isGraphic(CharSequence str) {
          final int len = str.length();
          for (int i=0; i<len; i++) {
              int gc = Character.getType(str.charAt(i));
              if (gc != Character.CONTROL
                      && gc != Character.FORMAT
                      && gc != Character.SURROGATE
                      && gc != Character.UNASSIGNED
                      && gc != Character.LINE_SEPARATOR
                      && gc != Character.PARAGRAPH_SEPARATOR
                      && gc != Character.SPACE_SEPARATOR) {
                  return true;
              }
          }
          return false;
      }
docs: Returns whether the given CharSequence contains any printable characters.