Created
September 17, 2009 23:43
-
-
Save jaydonnell/188788 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = Files.readLines( | |
new File("/path/to/file"), | |
Charsets.UTF_8, // remember that? :) | |
new LineProcessor<Integer>() { | |
int count = 0; | |
public boolean processLine(String line) { | |
count++; | |
} | |
public Integer getResult() { return count; } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment