Class URIUtil

java.lang.Object
com.gmt2001.httpclient.URIUtil

public final class URIUtil extends Object
Assists with creating a URI by automatically encoding characters that URI finds unacceptable
Author:
gmt2001
  • Method Details

    • create

      public static URI create(String uri)
      Creates a URI by parsing the given spec as described in RFC 2396 "Uniform Resource Identifiers: Generic * Syntax" and encoding any illegal characters according to the MIME format application/x-www-form-urlencoded using URLEncoder.encode(String, java.nio.charset.Charset)
      Parameters:
      uri - the string to parse
      Returns:
      the URI; null if unable to encode some or all of the URI successfully