public final class

URLUtils

extends Object
java.lang.Object
   ↳ com.neomades.util.URLUtils

Class Overview

URL encoding converts characters into a format that can be transmitted over the Internet.

Summary

Public Methods
static String decode(String encodedUrl, String encoding)
Decodes a URL string using the encoding.
static String decodeUTF8(String encodedUrl)
Decodes a URL string using the UTF-8 encoding.
static String encode(String url, String encoding)
Encodes a URL string using the specified encoding
static String encodeUTF8(String url)
Encodes a URL string using the UTF-8 encoding.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static String decode (String encodedUrl, String encoding)

Decodes a URL string using the encoding.

Parameters
encodedUrl the encoded URL string.
encoding the specified encoding
Returns
  • the decoded URL
Throws
UnsupportedEncodingException if the encoding parameter is not supported by the device

public static String decodeUTF8 (String encodedUrl)

Decodes a URL string using the UTF-8 encoding.

Parameters
encodedUrl a URL encoded with UTF-8 encoding
Returns
  • the decoded URL

public static String encode (String url, String encoding)

Encodes a URL string using the specified encoding

Parameters
url the string to encode
encoding the specified encoding
Returns
  • the encoded URL
Throws
UnsupportedEncodingException if the encoding parameter is not supported by the device

public static String encodeUTF8 (String url)

Encodes a URL string using the UTF-8 encoding.

Parameters
url the string to encode
Returns
  • the encoded URL with UTF-8