Pull Parser 2 FAQ

How to access the latest source code?

The latest packaged releases are available at http://www.extreme.indiana.edu/soap/ and the latest source (if you want to be on the cutting edge) can now be obtained now from anonymous CVS at:

cvs -d :pserver:anonymous@cvs.extreme.indiana.edu:/l/extreme/cvspub login
CVS password: cvsanon

cvs -d :pserver:anonymous@cvs.extreme.indiana.edu:/l/extreme/cvspub co xsoap-java/PullParser

Why XPP blocks when reading from input stream such as socket?

NOTE:pleasue use XPP version 2.1.8 or higher - in previous version there is ogg-by-one buffering bug.

XPP is a streaming parser however it depends on Reader to provide data in timely manner. The current JDK implementattion of InputStreamReader will try to read 8KB into internal buffer unless InputStream.available() function returns 0 (this behavior can not be overriden).

Therefore it is necessary to use a wrapper around InputStream to make sure that InputStreamReader will return as soon as data is available, for example:

public class NoBufferingInputStream
        extends FilterInputStream {

        public NoBufferingInputStream(InputStream in) {

        public int available() { return 0; };


then one would use following construct to create Reader:

InputStream socketInput = ...;
xpp.setInput(new InputStreamReader(
  new NoBufferingInputStream(socketInput)));

[Back To Pull Parser 2 Documentation]


Aleksander Slominski