java.io.IOException

Underlying input stream returned zero bytes

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 web284

  • via Unknown by Sid Singh,
  • Stack trace

    • java.io.IOException: Underlying input stream returned zero bytes at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:268) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) 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 com.database.DatabaseServices.getPacketData(DatabaseServices.java:134)

    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

    Unknown visitor
    Unknown visitorOnce,
    jstrayerjstrayer
    Once,
    rprp
    Once,
    zbalintzbalint
    Once,
    gamebusterzgamebusterz
    22 times, last one
    17 more bugmates