public class URLs extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
contentOf(URL url,
Charset charset)
Loads the text content of a URL into a character string.
|
static String |
contentOf(URL url,
String charsetName)
Loads the text content of a URL into a character string.
|
static List<String> |
linesOf(URL url,
Charset charset)
Loads the text content of a URL into a list of strings, each string corresponding to a line.
|
static List<String> |
linesOf(URL url,
String charsetName)
Loads the text content of a URL into a list of strings, each string corresponding to a line.
|
public static String contentOf(URL url, String charsetName)
url - the URL.charsetName - the name of the character set to use.IllegalArgumentException - if the given character set is not supported on this platform.RuntimeIOException - if an I/O exception occurs.public static String contentOf(URL url, Charset charset)
url - the URL.charset - the character set to use.NullPointerException - if the given charset is null.RuntimeIOException - if an I/O exception occurs.public static List<String> linesOf(URL url, Charset charset)
url - the URL.charset - the character set to use.NullPointerException - if the given charset is null.RuntimeIOException - if an I/O exception occurs.public static List<String> linesOf(URL url, String charsetName)
url - the URL.charsetName - the name of the character set to use.NullPointerException - if the given charset is null.RuntimeIOException - if an I/O exception occurs.Copyright © 2014–2016 AssertJ. All rights reserved.