Example usage for Java com.google.common.io Resources fields, constructors, methods, implement or subclass
The text is from its open source code.
ByteSource | asByteSource(URL url) Returns a ByteSource that reads from the given URL. |
CharSource | asCharSource(URL url, Charset charset) Returns a CharSource that reads from the given URL using the given character set. |
void | copy(URL from, OutputStream to) Copies all bytes from a URL to an output stream. |
URL | getResource(String resourceName) Returns a URL pointing to resourceName if the resource is found using the Thread#getContextClassLoader() context class loader . |
URL | getResource(Class> contextClass, String resourceName) Given a resourceName that is relative to contextClass , returns a URL pointing to the named resource. |
List | readLines(URL url, Charset charset) Reads all of the lines from a URL. |
T | readLines(URL url, Charset charset, LineProcessor Streams lines from a URL, stopping when our callback returns false, or we have read all of the lines. |
byte[] | toByteArray(URL url) Reads all bytes from a URL into a byte array. |
String | toString(URL url, Charset charset) Reads all characters from a URL into a String , using the given character set. |