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_VERSION
CHAR_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, reportXmlProblem
public static ByteSourceBootstrapper construct(ReaderConfig cfg, InputStream in) throws XMLStreamException
XMLStreamException
public static ByteSourceBootstrapper construct(ReaderConfig cfg, byte[] inputBuffer, int inputStart, int inputLen) throws XMLStreamException
XMLStreamException
public final XmlScanner bootstrap() throws XMLStreamException
InputBootstrapper
bootstrap
in class InputBootstrapper
XMLStreamException
public XmlScanner doBootstrap() throws IOException, XMLStreamException
IOException
XMLStreamException
protected boolean hasXmlDeclaration() throws IOException, XMLStreamException
IOException
XMLStreamException
protected String verifyXmlEncoding(String enc) throws XMLStreamException
XMLStreamException
protected boolean ensureLoaded(int minimum) throws IOException
IOException
protected void loadMore() throws IOException, XMLStreamException
IOException
XMLStreamException
protected void pushback()
pushback
in class InputBootstrapper
protected int getNext() throws IOException, XMLStreamException
getNext
in class InputBootstrapper
IOException
XMLStreamException
protected int getNextAfterWs(boolean reqWs) throws IOException, XMLStreamException
getNextAfterWs
in class InputBootstrapper
IOException
XMLStreamException
protected int checkKeyword(String exp) throws IOException, XMLStreamException
checkKeyword
in class InputBootstrapper
IOException
XMLStreamException
protected int readQuotedValue(char[] kw, int quoteChar) throws IOException, XMLStreamException
readQuotedValue
in class InputBootstrapper
IOException
XMLStreamException
protected Location getLocation()
getLocation
in class InputBootstrapper
protected byte nextByte() throws IOException, XMLStreamException
IOException
XMLStreamException
protected int skipSbWs() throws IOException, XMLStreamException
IOException
XMLStreamException
protected void skipSbLF(byte lfByte) throws IOException, XMLStreamException
IOException
XMLStreamException
protected int checkSbKeyword(String expected) throws IOException, XMLStreamException
IOException
XMLStreamException
protected int nextMultiByte() throws IOException, XMLStreamException
IOException
XMLStreamException
protected int skipMbWs() throws IOException, XMLStreamException
IOException
XMLStreamException
protected void skipMbLF(int lf) throws IOException, XMLStreamException
IOException
XMLStreamException
protected int checkMbKeyword(String expected) throws IOException, XMLStreamException
IOException
XMLStreamException
Copyright © 2019 FasterXML. All rights reserved.