java.io.IOException

Stream closed

Samebug tips1

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.


rprp

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web273

  • via Unknown by Logan Saturnius,
  • via Stack Overflow by JmRag
    ,
  • Stack trace

    • java.io.IOException: Stream closed at java.io.BufferedReader.ensureOpen(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at java.io.BufferedReader.readLine(Unknown Source) at Assignment2prog3.main(Assignment2prog3.java:65)

    Write tip

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

    Users with the same issue

    zbalintzbalint
    Once,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    Unknown visitor
    Unknown visitorOnce,
    17 more bugmates