在使用JsonReader解析Json时,我收到了SSLProtocolException

时间:2013-02-04 13:11:15

标签: android ssl android-parser jsonreader

我试图用JsonReader解析json响应,以便我可以直接使用Inputstream来解析它。 但我得到一个例外。 logcat的:

02-04 18:30:54.515: W/System.err(1695): javax.net.ssl.SSLProtocolException: Read error: ssl=0x36d690: Failure in SSL library, usually a protocol error
02-04 18:30:54.525: W/System.err(1695):     at org.apache.harmony.xnet.provider.jsse.NativeCrypto.SSL_read_byte(Native Method)
02-04 18:30:54.525: W/System.err(1695):     at org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputStream.read(OpenSSLSocketImpl.java:765)
02-04 18:30:54.525: W/System.err(1695):     at org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.readLine(HttpURLConnectionImpl.java:660)
02-04 18:30:54.525: W/System.err(1695):     at org.apache.harmony.luni.internal.net.www.protocol.http.ChunkedInputStream.readChunkSize(ChunkedInputStream.java:77)
02-04 18:30:54.525: W/System.err(1695):     at org.apache.harmony.luni.internal.net.www.protocol.http.ChunkedInputStream.read(ChunkedInputStream.java:45)
02-04 18:30:54.525: W/System.err(1695):     at java.io.InputStream.read(InputStream.java:157)
02-04 18:30:54.525: W/System.err(1695):     at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:225)
02-04 18:30:54.525: W/System.err(1695):     at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:178)
02-04 18:30:54.525: W/System.err(1695):     at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:174)
02-04 18:30:54.525: W/System.err(1695):     at java.io.InputStreamReader.read(InputStreamReader.java:255)
02-04 18:30:54.525: W/System.err(1695):     at com.google.gson.stream.JsonReader.fillBuffer(JsonReader.java:825)
02-04 18:30:54.525: W/System.err(1695):     at com.google.gson.stream.JsonReader.nextString(JsonReader.java:1045)
02-04 18:30:54.525: W/System.err(1695):     at com.google.gson.stream.JsonReader.nextValue(JsonReader.java:784)
02-04 18:30:54.525: W/System.err(1695):     at com.google.gson.stream.JsonReader.objectValue(JsonReader.java:766)
02-04 18:30:54.525: W/System.err(1695):     at com.google.gson.stream.JsonReader.peek(JsonReader.java:380)

我该如何解决这个问题。

0 个答案:

没有答案