code: public static String encodeString(String s) {
  
          try {
              return CODEC.encode(s.getBytes("UTF-8"));
          } catch (UnsupportedEncodingException e) {
              // shouldn't happen
              return null;
          }
      }
docs: Encodes a string.<p>
  
  @param s the input string
  @return the encoded string