title: How to skip invalid characters in stream in Java/Scala?
body: <p>For example I have following code </p>
  
  <pre><code>Source.fromFile(new File( path), "UTF-8").getLines()
  </code></pre>
  
  <p>and it throws exception </p>
  
  <pre><code>Exception in thread "main" java.nio.charset.MalformedInputException: Input length = 1
      at java.nio.charset.CoderResult.throwException(CoderResult.java:260)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:319)
  </code></pre>
  
  <p>I don't care if some lines were not read, but how to skip invalid chars and continue reading lines?</p>