I'm not very experienced with I/O, and I am interested in knowing what the standard idiom for reading text files is. I am writing a class that reads an entire book (the Bible) from a plain text flat file, and returns the book as a
String. Currently my code looks like this.
Specifically, I want to know if it is bad form to have all the reading logic in the constructor.
Also, when reading about writing code for testability, it mentioned that instead of passing a path as a parameter, a Reader should be passed to increase flexibility for
testing. But alas, I can no longer find this article and don't really remember the point that was being made.
Garrett
[ April 24, 2006: Message edited by: Garrett Rowe ]