title: Is there a preference for nested try/catch blocks?
body: <p>One of the things that always bugs me about using Readers and Streams in Java is that the <code>close()</code> method can throw an exception. Since it's a good idea to put the close method in a finally block, that necessitates a bit of an awkward situation. I usually use this construction:</p>
  
  <pre><code>FileReader fr = new FileReader("SomeFile.txt");
  try {
      try {
          fr.read();
      } finally {
          fr.close();
      }
  } catch(Exception e) {
      // Do exception handling
  }
  </code></pre>
  
  <p>But I've also seen this construction:</p>
  
  <pre><code>FileReader fr = new FileReader("SomeFile.txt");
  try {
      fr.read() 
  } catch (Exception e) {
      // Do exception handling
  } finally {
      try {
          fr.close();
      } catch (Exception e) {
          // Do exception handling
      }
  }
  </code></pre>
  
  <p>I prefer the first construction because there's only one catch block and it just seems more elegant. Is there a reason to actually prefer the second or an alternate construction?</p>
  
  <p>UPDATE: Would it make a difference if I pointed out that both <code>read</code> and <code>close</code> only throw IOExceptions? So it seems likely to me that, if read fails, close will fail for the same reason.</p>