public final class CharSourceBootstrapper extends InputBootstrapper
| Modifier and Type | Field and Description |
|---|---|
(package private) java.io.Reader |
_in
Underlying Reader to use for reading content.
|
(package private) char[] |
_inputBuffer |
private int |
_inputLast
Offset of the first character after the end of valid buffer
contents.
|
private int |
_inputPtr |
(package private) static char |
CHAR_BOM_MARKER |
(package private) static int |
DEFAULT_BUFFER_SIZE
Whether to use a bigger (4000, ie.
|
_config, _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, mDeclaredXmlVersion, mFoundEncoding, mKeyword, mStandaloneCHAR_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 | Constructor and Description |
|---|---|
private |
CharSourceBootstrapper(ReaderConfig cfg,
char[] buffer,
int start,
int len) |
private |
CharSourceBootstrapper(ReaderConfig cfg,
java.io.Reader r) |
| 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(java.lang.String exp) |
static CharSourceBootstrapper |
construct(ReaderConfig cfg,
char[] buffer,
int start,
int len) |
static CharSourceBootstrapper |
construct(ReaderConfig cfg,
java.io.Reader r) |
XmlScanner |
doBootstrap() |
protected javax.xml.stream.Location |
getLocation() |
protected int |
getNext() |
protected int |
getNextAfterWs(boolean reqWs) |
protected boolean |
initialLoad(int minimum) |
protected void |
loadMore() |
protected char |
nextChar() |
protected void |
pushback() |
protected int |
readQuotedValue(char[] kw,
int quoteChar) |
protected void |
skipCRLF(char lf) |
protected java.lang.String |
verifyXmlEncoding(java.lang.String enc) |
readXmlDeclaration, reportEof, reportNull, reportPseudoAttrProblem, reportUnexpectedChar, reportXmlProblemstatic final int DEFAULT_BUFFER_SIZE
static final char CHAR_BOM_MARKER
final java.io.Reader _in
final char[] _inputBuffer
private int _inputPtr
private int _inputLast
private CharSourceBootstrapper(ReaderConfig cfg, java.io.Reader r)
private CharSourceBootstrapper(ReaderConfig cfg, char[] buffer, int start, int len)
public static CharSourceBootstrapper construct(ReaderConfig cfg, java.io.Reader r) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic static CharSourceBootstrapper construct(ReaderConfig cfg, char[] buffer, int start, int len) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionpublic final XmlScanner bootstrap() throws javax.xml.stream.XMLStreamException
InputBootstrapperbootstrap in class InputBootstrapperjavax.xml.stream.XMLStreamExceptionpublic XmlScanner doBootstrap() throws java.io.IOException, javax.xml.stream.XMLStreamException
java.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected java.lang.String verifyXmlEncoding(java.lang.String enc)
throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionprotected boolean initialLoad(int minimum)
throws java.io.IOException
java.io.IOExceptionprotected void loadMore()
throws java.io.IOException,
javax.xml.stream.XMLStreamException
java.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected void pushback()
pushback in class InputBootstrapperprotected int getNext()
throws java.io.IOException,
javax.xml.stream.XMLStreamException
getNext in class InputBootstrapperjava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected int getNextAfterWs(boolean reqWs)
throws java.io.IOException,
javax.xml.stream.XMLStreamException
getNextAfterWs in class InputBootstrapperjava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected int checkKeyword(java.lang.String exp)
throws java.io.IOException,
javax.xml.stream.XMLStreamException
checkKeyword in class InputBootstrapperjava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected int readQuotedValue(char[] kw,
int quoteChar)
throws java.io.IOException,
javax.xml.stream.XMLStreamException
readQuotedValue in class InputBootstrapperjava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected javax.xml.stream.Location getLocation()
getLocation in class InputBootstrapperprotected char nextChar()
throws java.io.IOException,
javax.xml.stream.XMLStreamException
java.io.IOExceptionjavax.xml.stream.XMLStreamExceptionprotected void skipCRLF(char lf)
throws java.io.IOException,
javax.xml.stream.XMLStreamException
java.io.IOExceptionjavax.xml.stream.XMLStreamException