Class URIUtil

  • public class URIUtil
    extends Object
    URI Holder. This class assists with the decoding and encoding or HTTP URI's. It differs from the class as it does not provide communications ability, but it does assist with query string formatting.

    UTF-8 encoding is used by default for % encoded characters. This may be overridden with the org.eclipse.jetty.util.URI.charset system property. see UrlEncoded I2P modded from Jetty 8.1.15

    0.9.15, moved from web in 0.9.49
    • Constructor Detail

      • URIUtil

        public URIUtil()
    • Method Detail

      • encodePath

        public static String encodePath​(String path)
        Encode a URI path. This is the same encoding offered by URLEncoder, except that the '/' character is not encoded.
        path - The path the encode
        The encoded path
      • encodePath

        public static StringBuilder encodePath​(StringBuilder buf,
                                               String path)
        Encode a URI path. Somewhat oddly, this encodes all chars >= 0x80 if buf is null, (strict RFC 2396) but only the control, space, and special chars if buf is non-null.
        path - The path the encode
        buf - StringBuilder to encode path into (or null)
        The StringBuilder or null if no substitutions required.