{{theTime}}

Search This Blog

Total Pageviews

How to read File Contents

private StringBuilder readFileContents(File file) {
StringBuilder builder = new StringBuilder() ;
try {
assert file.exists() ;
BufferedReader reader = new BufferedReader( new FileReader(file)) ;
while( reader.readLine() != null) {
builder.append ( reader.readLine()) ;
}
}catch(IOException e){
e.printStackTrace() ;
}
return builder ;
}

No comments:

Best Client Optimized Programming Language for Mobile Development?

Use Google's Dart language, which is Object-oriented, class-based and garbage-collected language with C-Style.  Dart can compile to eith...