pnuts.net module

getLocalHost()

getLocalHost() returns an InetAddress object that represents the address of the local host.

getInetAddress(String host, String address) or
(String hostOrAddress)

getInetAddress() returns an InetAddress object of the specified address.

e.g.
getInetAddress("127.0.0.1")
getInetAddress("pnuts.org")
isLocalHost(InetAddress address) or
(String hostOrddress)

isLocalHost() checks if the specified address is one of the addresses of the local host.

e.g.
isLocalHost("127.0.0.1")
isLocalHost("pnuts.org")
encodeURL ( String str {, String encoding } )

encodeURL() converts a plain text to x-www-form-urlencoded text.

encoding is one of Java's encoding name. When encoding is omitted, the default encoding is used.

encodeURL("How are you?", "UTF-8") ==> "How+are+you%3F"
decodeURL ( String urlEncodedString {, String encoding } )

decodeURL() converts x-www-form-urlencoded text to plain text.

encoding is one of Java's encoding name. When encoding is omitted, the default encoding is used.

decodeURL("How+are+you%3F", "UTF-8") ==> "How are you?"
makeQueryString ( Map map , String encoding )

makeQueryString() returns a query string in x-www-form-urlencoded format, from the specified map which defines parameter-value pairs .