Fixed failing test.
Update JavaDocs to be more specific about wen STDIN is flushed or not.