Package org.postgresql.util

# Class URLCoder

java.lang.Object
org.postgresql.util.URLCoder

public final class URLCoder extends Object
This class helps with URL encoding and decoding. UTF-8 encoding is used by default to make encoding consistent across the driver, and encoding might be changed via `postgresql.url.encoding` property

Note: this should not be used outside of PostgreSQL source, this is not a public API of the driver.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `URLCoder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `decode(String encoded)`
  Decodes `x-www-form-urlencoded` string into Java string.
  `static String`
  `encode(String plain)`
  Encodes Java string into `x-www-form-urlencoded` format

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### URLCoder

    public URLCoder()

- ## Method Details

  - ### decode

    public static String decode(String encoded)
    Decodes `x-www-form-urlencoded` string into Java string.
    Parameters:
      `encoded` - encoded value
    Returns:
      decoded value
    See Also:
      - `URLDecoder.decode(String, String)`

  - ### encode

    public static String encode(String plain)
    Encodes Java string into `x-www-form-urlencoded` format
    Parameters:
      `plain` - input value
    Returns:
      encoded value
    See Also:
      - `URLEncoder.encode(String, String)`