|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.alee.utils.WebUtils
public final class WebUtils
This class provides a set of utilities to work with URLs and email addresses.
Constructor Summary | |
---|---|
WebUtils()
|
Method Summary | |
---|---|
static void |
browseSite(java.lang.String address)
Opens site in default system web-browser |
static void |
browseSiteSafely(java.lang.String address)
Opens site in default system web-browser safely |
static java.lang.String |
decodeUrl(java.lang.String url)
Returns decoded url path. |
static java.lang.String |
encodeUrl(java.lang.String url)
Returns encoded url path. |
static java.util.Map<java.lang.String,java.util.List<java.lang.String>> |
getUrlParameters(java.lang.String url)
Returns url query parameters. |
static java.lang.String |
normalizeUrl(java.lang.String url)
Returns normalized url path. |
static void |
openFile(java.io.File file)
Opens file in appropriate system application |
static void |
openFileSafely(java.io.File file)
Opens file in appropriate system application safely |
static void |
shareOnFb(java.lang.String address)
Opens system default web-browser with Facebook share page. |
static void |
shareOnTwitter(java.lang.String address)
Opens system default web-browser with Twitter share page. |
static void |
shareOnVk(java.lang.String address)
Opens system default web-browser with VKontakte share page. |
static void |
writeEmail(java.lang.String email)
Opens system mail agent to compose a new letter |
static void |
writeEmail(java.lang.String email,
java.lang.String subject,
java.lang.String body)
Opens system mail agent to compose a new letter |
static void |
writeEmailSafely(java.lang.String email)
Opens system mail agent to compose a new letter safely |
static void |
writeEmailSafely(java.lang.String email,
java.lang.String subject,
java.lang.String body)
Opens system mail agent to compose a new letter safely |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebUtils()
Method Detail |
---|
public static java.lang.String normalizeUrl(java.lang.String url)
url
- the url to normalize
public static java.util.Map<java.lang.String,java.util.List<java.lang.String>> getUrlParameters(java.lang.String url)
url
- the url to parse
public static java.lang.String encodeUrl(java.lang.String url)
url
- the url to encode
public static java.lang.String decodeUrl(java.lang.String url)
url
- the url to decode
public static void shareOnTwitter(java.lang.String address)
address
- the address to sharepublic static void shareOnVk(java.lang.String address)
address
- the address to sharepublic static void shareOnFb(java.lang.String address)
address
- the address to sharepublic static void browseSiteSafely(java.lang.String address)
address
- the address to openpublic static void browseSite(java.lang.String address) throws java.net.URISyntaxException, java.io.IOException
address
- the address to open
java.net.URISyntaxException
java.io.IOException
public static void openFileSafely(java.io.File file)
file
- the file to openpublic static void openFile(java.io.File file) throws java.io.IOException
file
- the file to open
java.io.IOException
public static void writeEmailSafely(java.lang.String email)
email
- the destination email addresspublic static void writeEmail(java.lang.String email) throws java.net.URISyntaxException, java.io.IOException
email
- the destination email address
java.net.URISyntaxException
java.io.IOException
public static void writeEmailSafely(java.lang.String email, java.lang.String subject, java.lang.String body)
email
- the destination email addresssubject
- letter subjectbody
- letter textpublic static void writeEmail(java.lang.String email, java.lang.String subject, java.lang.String body) throws java.net.URISyntaxException, java.io.IOException
email
- the destination email addresssubject
- letter subjectbody
- letter text
java.net.URISyntaxException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |