code: public static String encode(String raw) {
          String encoded = raw.replace("%", "%2A");
          encoded = encoded.replace("/", "%2F");
          return encoded;
      }
docs: Encode the given <code>String</code>. All occurrences of "/" are mapped to "%2A" and all occurrences of
  "%" to "%2F".
  
  @param raw
  the <code>String</code> to encode, must not be <code>null</code>
  @return the encoded version
  
  @see #decode(String)