Why Java implements so hard to reading a file
<p>I really don't know, why this is so complex and hard just for reading a file with a lot of classes</p>

<ul>
<li>InputStream</li>
<li>DataInputStream</li>
<li>InputStream</li>
<li>BufferReader</li>
</ul>

<p>What are advantages of below? And what are philosophy at here?</p>

<pre><code>private static String fileToString(String filename) throws IOException
{
    InputStream resourceAsStream;
    resourceAsStream        = "".getClass().getResourceAsStream(filename);
    DataInputStream in      = new DataInputStream(resourceAsStream);
    BufferedReader reader   = new BufferedReader(new InputStreamReader(in));
    StringBuilder builder   = new StringBuilder();
    String line;    
    // For every line in the file, append it to the string builder
    while((line = reader.readLine()) != null)
    {
        builder.append(line);
    }
    return builder.toString();
}
</code></pre>
