| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static String | Returns: the cleaned Google URL orurl if no search URL was detectedthe Google search URL string url)Cleans URLs returned by Google search. |
| public static Optional | Returns: The suffix, excluding the dot (e.g. "pdf")The link link, FilePreferences filePreferences)Look for the last '.' in the link, and return the following characters. |
| public static boolean |
| GOOGLE_SEARCH_EXP | back to summary |
|---|---|
| private static final String GOOGLE_SEARCH_EXP | |
| URL_EXP | back to summary |
|---|---|
| private static final String URL_EXP | |
| URLUtil | back to summary |
|---|---|
| private URLUtil() | |
| cleanGoogleSearchURL | back to summary |
|---|---|
| public static String cleanGoogleSearchURL(String url) Cleans URLs returned by Google search. ExampleIf you copy links from search results from Google, all links will be enriched with search meta data, e.g.https://www.google.de/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&&url=http%3A%2F%2Fwww.inrg.csie.ntu.edu.tw%2Falgorithm2014%2Fhomework%2FWagner-74.pdf&ei=DifeVYHkDYWqU5W0j6gD&usg=AFQjCNFl638rl5KVta1jIMWLyb4CPSZidg&sig2=0hSSMw9XZXL3HJWwEcJtOg
| |
| getSuffix | back to summary |
|---|---|
| public static Optional Look for the last '.' in the link, and return the following characters. This gives the extension for most reasonably named links. | |
| isURL | back to summary |
|---|---|
| public static boolean isURL(String url) Checks whether the given String is a URL. Currently only checks for a protocol String.
| |