On Jul 14, 2006, at 12:22 PM, Mohanbabu Narayanasamy wrote:
it works fine. I tried the same logic with StreamIoHandler like this:

            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)

This is a bug. In this scenario, read() should be return -1 to indicate end-of-stream.

I created (and resolved) a JIRA issue for this:

https://issues.apache.org/jira/browse/DIRMINA-226

.. please try the latest code in SVN and see if it fixes your issue. Thanks!!

-pete


--
[EMAIL PROTECTED] - http://fotap.org/~osi



Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to