Lines Matching refs:URL

28 import java.net.URL;
34 * Note that even though these methods use {@link URL} parameters, they
49 * read from the given URL.
51 * @param url the URL to read from
55 final URL url) {
67 * {@link InputStreamReader} that read a URL using the given character set.
69 * @param url the URL to read from
70 * @param charset the character set used when reading the URL contents
74 URL url, Charset charset) {
79 * Reads all bytes from a URL into a byte array.
81 * @param url the URL to read from
82 * @return a byte array containing all the bytes from the URL
85 public static byte[] toByteArray(URL url) throws IOException {
90 * Reads all characters from a URL into a {@link String}, using the given
93 * @param url the URL to read from
94 * @param charset the character set used when reading the URL
95 * @return a string containing all the characters from the URL
98 public static String toString(URL url, Charset charset) throws IOException {
103 * Streams lines from a URL, stopping when our callback returns false, or we
106 * @param url the URL to read from
107 * @param charset the character set used when reading the URL
112 public static <T> T readLines(URL url, Charset charset,
118 * Reads all of the lines from a URL. The lines do not include
122 * @param url the URL to read from
127 public static List<String> readLines(URL url, Charset charset)
133 * Copies all bytes from a URL to an output stream.
135 * @param from the URL to read from
139 public static void copy(URL from, OutputStream to) throws IOException {
144 * Returns a {@code URL} pointing to {@code resourceName} if the resource is
150 public static URL getResource(String resourceName) {
151 URL url = Resources.class.getClassLoader().getResource(resourceName);
157 * Returns a {@code URL} pointing to {@code resourceName} that is relative to
162 public static URL getResource(Class<?> contextClass, String resourceName) {
163 URL url = contextClass.getResource(resourceName);