com.fasterxml.aalto.in
Class ByteSourceBootstrapper
java.lang.Object
com.fasterxml.aalto.in.InputBootstrapper
com.fasterxml.aalto.in.ByteSourceBootstrapper
- All Implemented Interfaces:
- XmlConsts
public final class ByteSourceBootstrapper
- extends InputBootstrapper
Class that takes care of bootstrapping main document input from
a byte-oriented input source: usually either an InputStream
,
or a block source like byte array.
Fields inherited from interface com.fasterxml.aalto.util.XmlConsts |
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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
construct
public static ByteSourceBootstrapper construct(ReaderConfig cfg,
InputStream in)
throws XMLStreamException
- Throws:
XMLStreamException
construct
public static ByteSourceBootstrapper construct(ReaderConfig cfg,
byte[] inputBuffer,
int inputStart,
int inputLen)
throws XMLStreamException
- Throws:
XMLStreamException
doBootstrap
public XmlScanner doBootstrap()
throws IOException,
XMLStreamException
- Specified by:
doBootstrap
in class InputBootstrapper
- Throws:
IOException
XMLStreamException
hasXmlDeclaration
protected boolean hasXmlDeclaration()
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
verifyXmlEncoding
protected String verifyXmlEncoding(String enc)
throws XMLStreamException
- Returns:
- Normalized encoding name
- Throws:
XMLStreamException
ensureLoaded
protected boolean ensureLoaded(int minimum)
throws IOException
- Throws:
IOException
loadMore
protected void loadMore()
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
pushback
protected void pushback()
- Specified by:
pushback
in class InputBootstrapper
getNext
protected int getNext()
throws IOException,
XMLStreamException
- Specified by:
getNext
in class InputBootstrapper
- Throws:
IOException
XMLStreamException
getNextAfterWs
protected int getNextAfterWs(boolean reqWs)
throws IOException,
XMLStreamException
- Specified by:
getNextAfterWs
in class InputBootstrapper
- Throws:
IOException
XMLStreamException
checkKeyword
protected int checkKeyword(String exp)
throws IOException,
XMLStreamException
- Specified by:
checkKeyword
in class InputBootstrapper
- Returns:
- First character that does not match expected, if any;
CHAR_NULL if match succeeded
- Throws:
IOException
XMLStreamException
readQuotedValue
protected int readQuotedValue(char[] kw,
int quoteChar)
throws IOException,
XMLStreamException
- Specified by:
readQuotedValue
in class InputBootstrapper
- Throws:
IOException
XMLStreamException
getLocation
protected Location getLocation()
- Specified by:
getLocation
in class InputBootstrapper
nextByte
protected byte nextByte()
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
skipSbWs
protected int skipSbWs()
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
skipSbLF
protected void skipSbLF(byte lfByte)
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
checkSbKeyword
protected int checkSbKeyword(String expected)
throws IOException,
XMLStreamException
- Returns:
- First character that does not match expected, if any;
CHAR_NULL if match succeeded
- Throws:
IOException
XMLStreamException
nextMultiByte
protected int nextMultiByte()
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
skipMbWs
protected int skipMbWs()
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
skipMbLF
protected void skipMbLF(int lf)
throws IOException,
XMLStreamException
- Throws:
IOException
XMLStreamException
checkMbKeyword
protected int checkMbKeyword(String expected)
throws IOException,
XMLStreamException
- Returns:
- First character that does not match expected, if any;
CHAR_NULL if match succeeded
- Throws:
IOException
XMLStreamException
Copyright © 2012 Fasterxml.com. All Rights Reserved.