superwaba.ext.xplat.util.xml
Class RecordsStreamBuffer

java.lang.Object
  |
  +--superwaba.ext.xplat.util.xml.StreamBuffer
        |
        +--superwaba.ext.xplat.util.xml.RecordsStreamBuffer

public class RecordsStreamBuffer
extends StreamBuffer

This class adds support for parsing a Xml file splitted into different records of a Catalog. It is useful if your xml is too big to fit in a single record. Important! Each record must be written with DataStream.writeString and it must contain a single String, because the first 2 bytes of each record are skipped (they store the length of the String).


Field Summary
protected  Catalog cat
           
protected  int endRec
           
 
Fields inherited from class superwaba.ext.xplat.util.xml.StreamBuffer
buffer, mark, pos, size, stream
 
Constructor Summary
RecordsStreamBuffer(Catalog cat, int size, int startRec, int endRec)
          The records used in the catalog will be parsed from startRec to endRec
 
Method Summary
 int fill()
          Called from XmlLiteParser to get more data to parse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, toString, wait, wait
 

Field Detail

endRec

protected int endRec

cat

protected Catalog cat
Constructor Detail

RecordsStreamBuffer

public RecordsStreamBuffer(Catalog cat,
                           int size,
                           int startRec,
                           int endRec)
The records used in the catalog will be parsed from startRec to endRec
Method Detail

fill

public int fill()
Called from XmlLiteParser to get more data to parse
Overrides:
fill in class StreamBuffer
Tags copied from class: StreamBuffer
Returns:
The number of bytes written.