| Modifier and Type | Class and Description |
|---|---|
| public static class | Stax2Util.ByteAggregator
Helper class for efficiently reading and aggregating variable length byte content. |
| public static class | Stax2Util.TextBuffer
Helper class used to simplify text gathering while keeping at as efficient as possible. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private static final boolean | _isSpace(char c)
Note that it is assumed that any "weird" white space (xml 1.1 LSEP and NEL) have been replaced by canonical alternatives (linefeed for element content, regular space for attributes) |
| public static String | eventTypeDesc(int type)
Method that converts given standard Stax event type into textual representation. |
| public static String | Returns: Trimmed value iflexical had at least one
non-space character; null otherwiseMethod called to trim leading and/or trailing space that given lexical value has. |
| Stax2Util | back to summary |
|---|---|
| private Stax2Util() | |
| _isSpace | back to summary |
|---|---|
| private static final boolean _isSpace(char c) Note that it is assumed that any "weird" white space (xml 1.1 LSEP and NEL) have been replaced by canonical alternatives (linefeed for element content, regular space for attributes) | |
| eventTypeDesc | back to summary |
|---|---|
| public static String eventTypeDesc(int type) Method that converts given standard Stax event type into textual representation. | |
| trimSpaces | back to summary |
|---|---|
| public static String trimSpaces(String lexical) Method called to trim leading and/or trailing space that given lexical value has.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | DEFAULT_BLOCK_ARRAY_SIZE
Maximum block size we will use for individual non-aggregated blocks. |
| private static final int | INITIAL_BLOCK_SIZE
Size of the first block we will allocate. |
| private int | |
| private byte[][] | |
| private byte[] | mSpareBlock
Reusable byte buffer block; we retain biggest one from
|
| private int | |
| private static final byte[] |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public byte[] | Returns: Buffer in which to read additional dataMethod used to add bufferful of data to the aggregator, and get another buffer to read more data into. |
| public byte[] | aggregateAll(byte[] lastBlock, int lastLen)
Method called when results are finalized and we can get the full aggregated result buffer to return to the caller |
| public byte[] | Returns: Block that can be used to read in contentMethod called to initialize aggregation process. |
| DEFAULT_BLOCK_ARRAY_SIZE | back to summary |
|---|---|
| pack-priv static final int DEFAULT_BLOCK_ARRAY_SIZE Maximum block size we will use for individual non-aggregated blocks. Let's limit to using 256k chunks. | |
| INITIAL_BLOCK_SIZE | back to summary |
|---|---|
| private static final int INITIAL_BLOCK_SIZE Size of the first block we will allocate. | |
| mBlockCount | back to summary |
|---|---|
| private int mBlockCount | |
| mBlocks | back to summary |
|---|---|
| private byte[][] mBlocks | |
| mSpareBlock | back to summary |
|---|---|
| private byte[] mSpareBlock Reusable byte buffer block; we retain biggest one from
| |
| mTotalLen | back to summary |
|---|---|
| private int mTotalLen | |
| NO_BYTES | back to summary |
|---|---|
| private static final byte[] NO_BYTES | |
| ByteAggregator | back to summary |
|---|---|
| public ByteAggregator() | |
| addFullBlock | back to summary |
|---|---|
| public byte[] addFullBlock(byte[] block) Method used to add bufferful of data to the aggregator, and get another buffer to read more data into. Returned buffer is generally as big as or bigger than the given buffer, to try to improve performance for larger aggregations.
| |
| aggregateAll | back to summary |
|---|---|
| public byte[] aggregateAll(byte[] lastBlock, int lastLen) Method called when results are finalized and we can get the full aggregated result buffer to return to the caller | |
| startAggregation | back to summary |
|---|---|
| public byte[] startAggregation() Method called to initialize aggregation process.
| |
| Modifier and Type | Field and Description |
|---|---|
| private StringBuffer | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public String | |
| public boolean | |
| public void |
| mBuilder | back to summary |
|---|---|
| private StringBuffer mBuilder | |
| mText | back to summary |
|---|---|
| private String mText | |
| TextBuffer | back to summary |
|---|---|
| public TextBuffer() | |
| append | back to summary |
|---|---|
| public void append(String text) | |
| get | back to summary |
|---|---|
| public String get() | |
| isEmpty | back to summary |
|---|---|
| public boolean isEmpty() | |
| reset | back to summary |
|---|---|
| public void reset() | |