com.ctc.wstx.io
Class StreamBootstrapper
java.lang.Object
com.ctc.wstx.io.InputBootstrapper
com.ctc.wstx.io.StreamBootstrapper
- public final class StreamBootstrapper
- extends InputBootstrapper
Input bootstrap class used with streams, when encoding is not known
(when encoding is specified by application, a reader is constructed,
and then reader-based bootstrapper is used).
| Fields inherited from class com.ctc.wstx.io.InputBootstrapper |
BYTE_CR, BYTE_LF, BYTE_NULL, CHAR_CR, CHAR_LF, CHAR_NULL, CHAR_SPACE, ERR_XMLDECL_END_MARKER, ERR_XMLDECL_EXP_ATTRVAL, ERR_XMLDECL_EXP_EQ, ERR_XMLDECL_EXP_SPACE, ERR_XMLDECL_KW_ENCODING, ERR_XMLDECL_KW_STANDALONE, ERR_XMLDECL_KW_VERSION, mInputProcessed, mInputRow, mInputRowStart, mPublicId, mSystemId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
getInstance
public static StreamBootstrapper getInstance(java.io.InputStream in,
java.lang.String pubId,
java.lang.String sysId,
int bufSize)
bootstrapInput
public java.io.Reader bootstrapInput(boolean mainDoc,
javax.xml.stream.XMLReporter rep)
throws java.io.IOException,
WstxException
- Specified by:
bootstrapInput in class InputBootstrapper
- Throws:
java.io.IOException
WstxException
getAppEncoding
public java.lang.String getAppEncoding()
- By definition, when this bootstrapper is used, encoding is not
known...
- Specified by:
getAppEncoding in class InputBootstrapper
- Returns:
- Application specified input-encoding used, if any; null
if no information was passed.
getInputTotal
public int getInputTotal()
- Specified by:
getInputTotal in class InputBootstrapper
- Returns:
- Total number of characters read from bootstrapped input
(stream, reader)
getInputColumn
public int getInputColumn()
- Specified by:
getInputColumn in class InputBootstrapper
resolveStreamEncoding
protected void resolveStreamEncoding()
throws java.io.IOException,
WstxException
- Method called to try to figure out physical encoding the underlying
input stream uses.
- Throws:
java.io.IOException
WstxException
verifyXmlEncoding
protected java.lang.String verifyXmlEncoding(java.lang.String enc)
throws WstxException
- Throws:
WstxException
initialLoad
protected boolean initialLoad(int minimum)
throws java.io.IOException
- Throws:
java.io.IOException
loadMore
protected void loadMore()
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
pushback
protected void pushback()
- Specified by:
pushback in class InputBootstrapper
getNext
protected int getNext()
throws java.io.IOException,
WstxException
- Specified by:
getNext in class InputBootstrapper
- Throws:
java.io.IOException
WstxException
getNextAfterWs
protected int getNextAfterWs(boolean reqWs)
throws java.io.IOException,
WstxException
- Specified by:
getNextAfterWs in class InputBootstrapper
- Throws:
java.io.IOException
WstxException
checkKeyword
protected int checkKeyword(java.lang.String exp)
throws java.io.IOException,
WstxException
- Specified by:
checkKeyword in class InputBootstrapper
- Returns:
- First character that does not match expected, if any;
CHAR_NULL if match succeeded
- Throws:
java.io.IOException
WstxException
readQuotedValue
protected int readQuotedValue(char[] kw,
int quoteChar,
boolean norm)
throws java.io.IOException,
WstxException
- Specified by:
readQuotedValue in class InputBootstrapper
- Throws:
java.io.IOException
WstxException
hasXmlDecl
protected boolean hasXmlDecl()
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
getLocation
protected javax.xml.stream.Location getLocation()
- Specified by:
getLocation in class InputBootstrapper
nextByte
protected byte nextByte()
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
skipSbWs
protected int skipSbWs()
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
skipSbLF
protected void skipSbLF(byte lfByte)
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
checkSbKeyword
protected int checkSbKeyword(java.lang.String expected)
throws java.io.IOException,
WstxException
- Returns:
- First character that does not match expected, if any;
CHAR_NULL if match succeeded
- Throws:
java.io.IOException
WstxException
nextMultiByte
protected int nextMultiByte()
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
skipMbWs
protected int skipMbWs()
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
skipMbLF
protected void skipMbLF(int lf)
throws java.io.IOException,
WstxException
- Throws:
java.io.IOException
WstxException
checkMbKeyword
protected int checkMbKeyword(java.lang.String expected)
throws java.io.IOException,
WstxException
- Returns:
- First character that does not match expected, if any;
CHAR_NULL if match succeeded
- Throws:
java.io.IOException
WstxException