|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.openexi.proc.EXIDecoder
public class EXIDecoder
EXIDecoder provides methods to configure and
instantiate a Scanner object
you can use to parse the contents of an EXI stream.
| Constructor Summary | |
|---|---|
EXIDecoder()
Creates an instance of EXIDecoder with the default inflator buffer size of 8192 bytes. |
|
EXIDecoder(int inflatorBufSize,
boolean useThreadedInflater)
Creates an instance of EXIDecoder with the specified inflator buffer size. |
|
| Method Summary | |
|---|---|
Scanner |
processHeader()
This method reads and configures any header options present in the EXI stream, then returns a Scanner
object you can use to parse the values from the EXI stream. |
void |
setAlignmentType(AlignmentType alignmentType)
Set the bit alignment style of the stream to be decoded. |
void |
setBlockSize(int blockSize)
Set the size, in number of values, of the information that will be processed as a chunk of the entire EXI stream. |
void |
setDatatypeRepresentationMap(QName[] dtrm,
int n_bindings)
Set a datatype representation map (DTRM). |
void |
setEnableBinaryData(boolean enable)
Each binary value will be returned as in a EventDescription of EVENT_BLOB instead of EVENT_CH when enabled. |
void |
setFragment(boolean isFragment)
Set whether the document is a fragment. |
void |
setGrammarCache(GrammarCache grammarCache)
Set the GrammarCache used in decoding EXI streams. |
void |
setInitialBinaryDataBufferSize(int initialSize)
|
void |
setInputStream(java.io.InputStream istream)
Set an input stream from which the encoded stream is read. |
void |
setPreserveLexicalValues(boolean preserveLexicalValues)
Set to true to preserve the original string values from the EXI stream. |
void |
setValueMaxLength(int valueMaxLength)
Set the maximum length of a string that will be stored for reuse in the String Table. |
void |
setValuePartitionCapacity(int valuePartitionCapacity)
Set the maximum number of values in the String Table. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EXIDecoder()
public EXIDecoder(int inflatorBufSize,
boolean useThreadedInflater)
inflatorBufSize - size of the buffer, in bytes.useThreadedInflater - Inflater will be run in its own thread if true| Method Detail |
|---|
public final void setInputStream(java.io.InputStream istream)
istream - InputSream to be read.
public final void setAlignmentType(AlignmentType alignmentType)
throws org.openexi.proc.common.EXIOptionsException
alignmentType - AlignmentType object
org.openexi.proc.common.EXIOptionsExceptionpublic final void setFragment(boolean isFragment)
isFragment - true if the stream is an XML fragment
public final void setGrammarCache(GrammarCache grammarCache)
throws org.openexi.proc.common.EXIOptionsException
grammarCache - GrammarCache
org.openexi.proc.common.EXIOptionsException
public final void setBlockSize(int blockSize)
throws org.openexi.proc.common.EXIOptionsException
blockSize - number of values in each processing block. Default is 1,000,000.
org.openexi.proc.common.EXIOptionsExceptionpublic final void setValueMaxLength(int valueMaxLength)
valueMaxLength - maximum length of entries in the String Table.public final void setValuePartitionCapacity(int valuePartitionCapacity)
valuePartitionCapacity - maximum number of entries in the String Table
public final void setPreserveLexicalValues(boolean preserveLexicalValues)
throws org.openexi.proc.common.EXIOptionsException
preserveLexicalValues - true to keep original strings intact
org.openexi.proc.common.EXIOptionsException
public final void setDatatypeRepresentationMap(QName[] dtrm,
int n_bindings)
throws org.openexi.proc.common.EXIOptionsException
QName q1 = new QName("xsd:boolean","http://www.w3.org/2001/XMLSchema");
QName q2 = new QName("exi:integer","http://www.w3.org/2009/exi");
QName[] dtrm = new QName[2];
dtrm = {q1, q2}; // Each mapping requires 2 qualified names.
decoderInstance.setDatatypeRepresentationMap(dtrm, 1); // The array, and the number of pairs (1).
dtrm - a sequence of pairs of datatype QName and datatype representation QNamen_bindings - the number of QName pairs
org.openexi.proc.common.EXIOptionsExceptionpublic final void setEnableBinaryData(boolean enable)
enable - public final void setInitialBinaryDataBufferSize(int initialSize)
public Scanner processHeader()
throws java.io.IOException,
org.openexi.proc.common.EXIOptionsException
Scanner
object you can use to parse the values from the EXI stream.
java.io.IOException
org.openexi.proc.common.EXIOptionsException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||