public final class ByteSourceBootstrapper extends InputBootstrapper
InputStream,
or a block source like byte array._inputProcessed, _inputRow, _inputRowStart, 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_VERSIONCHAR_CR, CHAR_LF, CHAR_NULL, CHAR_SPACE, MAX_UNICODE_CHAR, STAX_DEFAULT_OUTPUT_ENCODING, STAX_DEFAULT_OUTPUT_VERSION, XML_DECL_KW_ENCODING, XML_DECL_KW_STANDALONE, XML_DECL_KW_VERSION, XML_SA_NO, XML_SA_YES, XML_V_10, XML_V_10_STR, XML_V_11, XML_V_11_STR, XML_V_UNKNOWN| Modifier and Type | Method and Description |
|---|---|
XmlScanner |
bootstrap()
Main bootstrapping method, which will try to open the underlying
input source, check its encoding, read xml declaration if
there is one, and finally create a scanner for actual parsing.
|
protected int |
checkKeyword(String exp) |
protected int |
checkMbKeyword(String expected) |
protected int |
checkSbKeyword(String expected) |
static ByteSourceBootstrapper |
construct(ReaderConfig cfg,
byte[] inputBuffer,
int inputStart,
int inputLen) |
static ByteSourceBootstrapper |
construct(ReaderConfig cfg,
InputStream in) |
XmlScanner |
doBootstrap() |
protected boolean |
ensureLoaded(int minimum) |
protected Location |
getLocation() |
protected int |
getNext() |
protected int |
getNextAfterWs(boolean reqWs) |
protected boolean |
hasXmlDeclaration() |
protected void |
loadMore() |
protected byte |
nextByte() |
protected int |
nextMultiByte() |
protected void |
pushback() |
protected int |
readQuotedValue(char[] kw,
int quoteChar) |
protected void |
skipMbLF(int lf) |
protected int |
skipMbWs() |
protected void |
skipSbLF(byte lfByte) |
protected int |
skipSbWs() |
protected String |
verifyXmlEncoding(String enc) |
readXmlDeclaration, reportEof, reportNull, reportPseudoAttrProblem, reportUnexpectedChar, reportXmlProblempublic static ByteSourceBootstrapper construct(ReaderConfig cfg, InputStream in) throws XMLStreamException
XMLStreamExceptionpublic static ByteSourceBootstrapper construct(ReaderConfig cfg, byte[] inputBuffer, int inputStart, int inputLen) throws XMLStreamException
XMLStreamExceptionpublic final XmlScanner bootstrap() throws XMLStreamException
InputBootstrapperbootstrap in class InputBootstrapperXMLStreamExceptionpublic XmlScanner doBootstrap() throws IOException, XMLStreamException
IOExceptionXMLStreamExceptionprotected boolean hasXmlDeclaration()
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected String verifyXmlEncoding(String enc) throws XMLStreamException
XMLStreamExceptionprotected boolean ensureLoaded(int minimum)
throws IOException
IOExceptionprotected void loadMore()
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected void pushback()
pushback in class InputBootstrapperprotected int getNext()
throws IOException,
XMLStreamException
getNext in class InputBootstrapperIOExceptionXMLStreamExceptionprotected int getNextAfterWs(boolean reqWs)
throws IOException,
XMLStreamException
getNextAfterWs in class InputBootstrapperIOExceptionXMLStreamExceptionprotected int checkKeyword(String exp) throws IOException, XMLStreamException
checkKeyword in class InputBootstrapperIOExceptionXMLStreamExceptionprotected int readQuotedValue(char[] kw,
int quoteChar)
throws IOException,
XMLStreamException
readQuotedValue in class InputBootstrapperIOExceptionXMLStreamExceptionprotected Location getLocation()
getLocation in class InputBootstrapperprotected byte nextByte()
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected int skipSbWs()
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected void skipSbLF(byte lfByte)
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected int checkSbKeyword(String expected) throws IOException, XMLStreamException
IOExceptionXMLStreamExceptionprotected int nextMultiByte()
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected int skipMbWs()
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected void skipMbLF(int lf)
throws IOException,
XMLStreamException
IOExceptionXMLStreamExceptionprotected int checkMbKeyword(String expected) throws IOException, XMLStreamException
IOExceptionXMLStreamExceptionCopyright © 2019 FasterXML. All rights reserved.