com.fasterxml.aalto.in
Class CharSourceBootstrapper

java.lang.Object
  extended by com.fasterxml.aalto.in.InputBootstrapper
      extended by com.fasterxml.aalto.in.CharSourceBootstrapper
All Implemented Interfaces:
XmlConsts

public final class CharSourceBootstrapper
extends InputBootstrapper

Class that takes care of bootstrapping main document input from a Stream input source.


Field Summary
 
Fields inherited from class com.fasterxml.aalto.in.InputBootstrapper
_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
 
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
 
Method Summary
protected  int checkKeyword(String exp)
           
static CharSourceBootstrapper construct(ReaderConfig cfg, char[] buffer, int start, int len)
           
static CharSourceBootstrapper construct(ReaderConfig cfg, Reader r)
           
 XmlScanner doBootstrap()
           
protected  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  String verifyXmlEncoding(String enc)
           
 
Methods inherited from class com.fasterxml.aalto.in.InputBootstrapper
bootstrap, readXmlDeclaration, reportEof, reportNull, reportPseudoAttrProblem, reportUnexpectedChar, reportXmlProblem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

construct

public static CharSourceBootstrapper construct(ReaderConfig cfg,
                                               Reader r)
                                        throws XMLStreamException
Throws:
XMLStreamException

construct

public static CharSourceBootstrapper construct(ReaderConfig cfg,
                                               char[] buffer,
                                               int start,
                                               int len)
                                        throws XMLStreamException
Throws:
XMLStreamException

doBootstrap

public XmlScanner doBootstrap()
                       throws IOException,
                              XMLStreamException
Specified by:
doBootstrap in class InputBootstrapper
Throws:
IOException
XMLStreamException

verifyXmlEncoding

protected String verifyXmlEncoding(String enc)
                            throws XMLStreamException
Returns:
Normalized encoding name
Throws:
XMLStreamException

initialLoad

protected boolean initialLoad(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

nextChar

protected char nextChar()
                 throws IOException,
                        XMLStreamException
Throws:
IOException
XMLStreamException

skipCRLF

protected void skipCRLF(char lf)
                 throws IOException,
                        XMLStreamException
Throws:
IOException
XMLStreamException


Copyright © 2012 Fasterxml.com. All Rights Reserved.