title: How make InputStreamReader fail on invalid data for encoding?
body: <p>I have some bytes which should be UTF-8 encoded, but which may contain a text is ISO8859-1 encoding, if the user somehow didn't manage to use his text editor the right way.</p>
  
  <p>I read the file with an InputStreamReader:</p>
  
  <pre><code>InputStreamReader reader = new InputStreamReader( 
      new FileInputStream(file), Charset.forName("UTF-8"));
  </code></pre>
  
  <p>But every time the user uses umlauts like "ä", which are invalid UTF-8 when stored in ISO8859-1 the InputStreamReader does not complain but adds placeholder characters. </p>
  
  <p>Is there is simple way to make this throw an Exception on invalid input?</p>