public class WebUtils
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PASTEBIN_URL_PREFIX |
| Constructor and Description |
|---|
WebUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.awt.image.BufferedImage |
downloadImage(java.lang.String url)
Download an image from an url.
|
static java.lang.String |
readPastebin(java.lang.String pasteID)
Get content from a pastebin file as String, split to multiple lines using newlines.
|
static java.util.List<java.lang.String> |
readPastebinAsList(java.lang.String pasteID)
Get content from a pastebin file as List, with every newline as a new entry.
|
static com.google.common.util.concurrent.ListenableFuture<java.util.List<java.lang.String>> |
readPastebinAsListAsync(java.lang.String pasteID)
Get content from a pastebin file as String, with every newline as a new entry, asynchronously.
|
static com.google.common.util.concurrent.ListenableFuture<java.lang.String> |
readPastebinAsync(java.lang.String pasteID)
Get content from a pastebin file as String, split to multiple lines using newlines asynchronously.
|
static java.lang.String |
readURL(java.lang.String url)
Get content from a url as String, split to multiple lines using newlines.
|
static java.util.List<java.lang.String> |
readURLAsList(java.lang.String url)
Get content from a url as List, with every newline as a new entry.
|
static com.google.common.util.concurrent.ListenableFuture<java.util.List<java.lang.String>> |
readURLAsListAsync(java.lang.String url)
Get content from a url as List, with every newline as a new entry, asynchronously.
|
static com.google.common.util.concurrent.ListenableFuture<java.lang.String> |
readURLAsync(java.lang.String url)
Get content from a url as String, split to multiple lines using newlines, asynchronously.
|
public static final java.lang.String PASTEBIN_URL_PREFIX
public static java.lang.String readPastebin(java.lang.String pasteID)
pasteID - the paste id to read data frompublic static java.util.List<java.lang.String> readPastebinAsList(java.lang.String pasteID)
pasteID - the paste id to read data frompublic static java.lang.String readURL(java.lang.String url)
url - the url to read data frompublic static java.util.List<java.lang.String> readURLAsList(java.lang.String url)
url - the url to read data frompublic static java.awt.image.BufferedImage downloadImage(java.lang.String url)
url - the image urlpublic static com.google.common.util.concurrent.ListenableFuture<java.lang.String> readURLAsync(java.lang.String url)
url - the url to read data frompublic static com.google.common.util.concurrent.ListenableFuture<java.util.List<java.lang.String>> readURLAsListAsync(java.lang.String url)
url - the url to read data frompublic static com.google.common.util.concurrent.ListenableFuture<java.lang.String> readPastebinAsync(java.lang.String pasteID)
pasteID - the paste id to read data frompublic static com.google.common.util.concurrent.ListenableFuture<java.util.List<java.lang.String>> readPastebinAsListAsync(java.lang.String pasteID)
pasteID - the paste id to read data from