xerces-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dariush Behboudi" <dariush.behbo...@glamm.com>
Subject How to pass a Reader to XMLInputSource
Date Wed, 06 Nov 2002 18:54:58 GMT
Hi everyone,
I'm trying to parse a stream red from a socket using XMLInputSource, but an
error occurs as follow:

java.lang.IllegalStateException: Current state = FLUSHED, new state =
CODING_END

        at
java.nio.charset.CharsetEncoder.throwIllegalStateException(CharsetEnc
oder.java:933)
        at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:529)
        at
sun.nio.cs.StreamEncoder$CharsetSE.flushLeftoverChar(StreamEncoder.ja
va:356)
        at
sun.nio.cs.StreamEncoder$CharsetSE.implClose(StreamEncoder.java:413)
        at sun.nio.cs.StreamEncoder.close(StreamEncoder.java:158)
        at java.io.OutputStreamWriter.close(OutputStreamWriter.java:222)
        at java.io.PrintWriter.close(PrintWriter.java:137)
        at
org.apache.catalina.connector.ResponseBase.finishResponse(ResponseBas
e.java:482)
        at
org.apache.catalina.connector.HttpResponseBase.finishResponse(HttpRes
ponseBase.java:236)
        at
org.apache.catalina.connector.http.HttpResponseImpl.finishResponse(Ht
tpResponseImpl.java:288)
        at
org.apache.catalina.connector.http.HttpProcessor.process(HttpProcesso
r.java:1039)
        at
org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.ja
va:1107)
        at java.lang.Thread.run(Thread.java:536)

My code is:
public void test (Reader HTMLrdr) {
    ........
    parser.parse(new XMLInputSource(null, null , null, HTMLrdr, null));
}

Any suggestions?
Best regards, Dariush.

Mime
View raw message