java.io.IOException

tip

When you iterate over the lines of a scala.io.Source with source.getLines, make sure you do not close the source until you processed the iterator.

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • exception caught: error reading
    via by 807594,
  • BufferedReader
    via by 807594,
  • Catch catching too soon
    via by 807595,
  • Stream closed exception in logs
    via GitHub by yegor256
    ,
  • NginxTest randomly fails
    via GitHub by caarlos0
    ,
  • Java exceptions at different functions
    via Stack Overflow by JmRag
    ,
    • java.io.IOException: Stream closed at java.io.BufferedInputStream.ensureOpen(BufferedInputStream.java:120) at java.io.BufferedInputStream.read(BufferedInputStream.java:270) at sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:406) at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:446) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:180) at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at java.io.BufferedReader.readLine(BufferedReader.java:299) at java.io.BufferedReader.readLine(BufferedReader.java:362) at ListOfRncs.inFileUserInput(ListOfRncs.java:314) at ListOfRncs.main(ListOfRncs.java:332)

    Users with the same issue

    zbalint
    1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    15 more bugmates