MCPcopy Create free account
hub / github.com/antlr/codebuff / readLines

Method readLines

corpus/java/training/guava/io/Resources.java:126–130  ·  view source on GitHub ↗

Streams lines from a URL, stopping when our callback returns false, or we have read all of the lines. @param url the URL to read from @param charset the charset used to decode the input stream; see Charsets for helpful predefined constants @param callback the LineProcessor to use to han

(URL url, Charset charset, LineProcessor<T> callback)

Source from the content-addressed store, hash-verified

124 * @throws IOException if an I/O error occurs
125 */
126 @CanIgnoreReturnValue // some processors won't return a useful result
127 public static <T> T readLines(URL url, Charset charset, LineProcessor<T> callback)
128 throws IOException {
129 return asCharSource(url, charset).readLines(callback);
130 }
131
132 /**
133 * Reads all of the lines from a URL. The lines do not include line-termination characters, but do

Callers

nothing calls this directly

Calls 2

asCharSourceMethod · 0.95
newArrayListMethod · 0.95

Tested by

no test coverage detected