## gov.usgs.earthquake.event
Class UrlUtil

    java.lang.Object
      gov.usgs.earthquake.event.UrlUtil

    public class UrlUtil

extends java.lang.Object

Utility methods for building and opening URLs.

Field Summary
`static java.lang.String` `GZIP_ENCODING`

Constructor Summary
`UrlUtil()`

Method Summary
`static java.io.InputStream` `getInputStream(java.net.URL url)` Open a URL attempting to use gzip compression.
`static java.lang.String` `getQueryString(java.util.HashMap<java.lang.String,java.lang.Object> params)` Utility method to build a query string from a map of parameters.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### GZIP_ENCODING

    public static final java.lang.String GZIP_ENCODING

See Also:
  Constant Field Values

Constructor Detail

### UrlUtil

    public UrlUtil()

Method Detail

### getInputStream

    public static java.io.InputStream getInputStream(java.net.URL url)
                                              throws java.io.IOException

  Open a URL attempting to use gzip compression.

  Parameters:
    `url` - url to open
  Returns:
    opened InputStream, ready to be read.
  Throws:
    `java.io.IOException`

### getQueryString

    public static java.lang.String getQueryString(java.util.HashMap<java.lang.String,java.lang.Object> params)

  Utility method to build a query string from a map of parameters.

  Parameters:
    `params` - the params, and keys with null values are omitted.
  Returns:
    query string containing params.