Any reason why no exception is thrown in case of non ssl mode.

Explicitly the connection is not closed before reading data from stream.

Making use of BufferedHttpEntity solves this issue. (Is it a right approach?)
entity = new BufferedHttpEntity(entity)
entity.getContent();

Use of BufferedHttpEntity() has any performance impact? 

--Prasad


________________________________
From: Oleg Kalnichevski <[email protected]>
To: HttpClient User Discussion <[email protected]>
Sent: Tue, April 20, 2010 3:23:35 PM
Subject: Re: instream.read() ---- In SSL mode

On Tue, 2010-04-20 at 02:37 -0700, Guru Prasad P.S wrote:
> Exception trace:
> java.net.SocketException: Socket Closed
>         at java.net.PlainSocketImpl.setOption(PlainSocketImpl.java:201)
>         at java.net.Socket.setSoTimeout(Socket.java:997)
>         at 
> com.sun.net.ssl.internal.ssl.SSLSocketImpl.setSoTimeout(SSLSocketImpl.java:2061)
>         at 
> org.apache.http.impl.io.SocketInputBuffer.isDataAvailable(SocketInputBuffer.java:145)
>         at 
> org.apache.http.impl.conn.LoggingSessionInputBuffer.isDataAvailable(LoggingSessionInputBuffer.java:64)
>         at 
> org.apache.http.impl.io.IdentityInputStream.available(IdentityInputStream.java:74)
>         at 
> org.apache.http.conn.EofSensorInputStream.available(EofSensorInputStream.java:171)
>         at java.io.BufferedInputStream.read(BufferedInputStream.java:325)
>         at java.io.FilterInputStream.read(FilterInputStream.java:90)

The exception is thrown because you are trying to read data from a
connection that has already been closed.

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: mailto:[email protected]
For additional commands, e-mail: mailto:[email protected]


      

Reply via email to