[ https://issues.apache.org/jira/browse/DIRMINA-226?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Emmanuel Lecharny closed DIRMINA-226. ------------------------------------- > IoSessionInputStream.read() does not properly return -1 to indicate > end-of-stream. > ---------------------------------------------------------------------------------- > > Key: DIRMINA-226 > URL: https://issues.apache.org/jira/browse/DIRMINA-226 > Project: MINA > Issue Type: Bug > Affects Versions: 0.9.4 > Reporter: peter royal > Assignee: peter royal > Fix For: 0.9.5 > > > With the following snippet: > BufferedReader in = new BufferedReader( > new InputStreamReader( this.in ) ); > String line; > while ( ( line = in.readLine() ) != null && > !line.equals( "" ) ) > { > System.out.println("data is:" + line); > } > After the data is printed, there is an exception > java.io.IOException: Stream is closed. > at > org.apache.mina.handler.support.IoSessionInputStream.waitForData(IoSessionInputStream.java:131) > at > org.apache.mina.handler.support.IoSessionInputStream.read(IoSessionInputStream.java:102) > at > sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411) > at > sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453) > at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183) > 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) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.