Class SimpleCharStream
java.lang.Object
nablarch.test.tool.htmlcheck.parser.SimpleCharStream
An implementation of interface CharStream, where the stream is assumed to
 contain only ASCII characters (without unicode processing).
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected int[]protected char[]protected int[]intPosition in buffer.protected intprotected intprotected Readerprotected intprotected intprotected booleanprotected booleanstatic final booleanWhether parser is static.protected int
- 
Constructor SummaryConstructorsConstructorDescriptionSimpleCharStream(InputStream dstream) Constructor.SimpleCharStream(InputStream dstream, int startline, int startcolumn) Constructor.SimpleCharStream(InputStream dstream, int startline, int startcolumn, int buffersize) Constructor.SimpleCharStream(InputStream dstream, String encoding) Constructor.SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) Constructor.SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) Constructor.SimpleCharStream(Reader dstream) Constructor.SimpleCharStream(Reader dstream, int startline, int startcolumn) Constructor.SimpleCharStream(Reader dstream, int startline, int startcolumn, int buffersize) Constructor.
- 
Method SummaryModifier and TypeMethodDescriptionvoidadjustBeginLineColumn(int newLine, int newCol) Method to adjust line and column numbers for the start of a token.voidbackup(int amount) Backup a number of characters.charStart.voidDone()Reset buffer when finished.protected voidExpandBuff(boolean wrapAround) protected voidFillBuff()intGet token beginning column number.intGet token beginning line number.intDeprecated.intGet token end column number.intGet token end line number.GetImage()Get token literal value.intgetLine()Deprecated.char[]GetSuffix(int len) Get the suffix.protected intgetTabSize(int i) charreadChar()Read a character.voidReInit(InputStream dstream) Reinitialise.voidReInit(InputStream dstream, int startline, int startcolumn) Reinitialise.voidReInit(InputStream dstream, int startline, int startcolumn, int buffersize) Reinitialise.voidReInit(InputStream dstream, String encoding) Reinitialise.voidReInit(InputStream dstream, String encoding, int startline, int startcolumn) Reinitialise.voidReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) Reinitialise.voidReinitialise.voidReinitialise.voidReinitialise.protected voidsetTabSize(int i) protected voidUpdateLineColumn(char c) 
- 
Field Details- 
staticFlagpublic static final boolean staticFlagWhether parser is static.- See Also:
 
- 
bufpospublic int bufposPosition in buffer.
- 
buflineprotected int[] bufline
- 
bufcolumnprotected int[] bufcolumn
- 
columnprotected int column
- 
lineprotected int line
- 
prevCharIsCRprotected boolean prevCharIsCR
- 
prevCharIsLFprotected boolean prevCharIsLF
- 
inputStream
- 
bufferprotected char[] buffer
- 
maxNextCharIndprotected int maxNextCharInd
- 
inBufprotected int inBuf
- 
tabSizeprotected int tabSize
 
- 
- 
Constructor Details- 
SimpleCharStreamConstructor.
- 
SimpleCharStreamConstructor.
- 
SimpleCharStreamConstructor.
- 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException Constructor.- Throws:
- UnsupportedEncodingException
 
- 
SimpleCharStreamConstructor.
- 
SimpleCharStreampublic SimpleCharStream(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException Constructor.- Throws:
- UnsupportedEncodingException
 
- 
SimpleCharStreamConstructor.
- 
SimpleCharStreamConstructor.- Throws:
- UnsupportedEncodingException
 
- 
SimpleCharStreamConstructor.
 
- 
- 
Method Details- 
setTabSizeprotected void setTabSize(int i) 
- 
getTabSizeprotected int getTabSize(int i) 
- 
ExpandBuffprotected void ExpandBuff(boolean wrapAround) 
- 
FillBuff- Throws:
- IOException
 
- 
BeginTokenStart.- Throws:
- IOException
 
- 
UpdateLineColumnprotected void UpdateLineColumn(char c) 
- 
readCharRead a character.- Throws:
- IOException
 
- 
getColumnDeprecated.
- 
getLineDeprecated.
- 
getEndColumnpublic int getEndColumn()Get token end column number.
- 
getEndLinepublic int getEndLine()Get token end line number.
- 
getBeginColumnpublic int getBeginColumn()Get token beginning column number.
- 
getBeginLinepublic int getBeginLine()Get token beginning line number.
- 
backuppublic void backup(int amount) Backup a number of characters.
- 
ReInitReinitialise.
- 
ReInitReinitialise.
- 
ReInitReinitialise.
- 
ReInitpublic void ReInit(InputStream dstream, String encoding, int startline, int startcolumn, int buffersize) throws UnsupportedEncodingException Reinitialise.- Throws:
- UnsupportedEncodingException
 
- 
ReInitReinitialise.
- 
ReInitReinitialise.- Throws:
- UnsupportedEncodingException
 
- 
ReInitReinitialise.
- 
ReInitpublic void ReInit(InputStream dstream, String encoding, int startline, int startcolumn) throws UnsupportedEncodingException Reinitialise.- Throws:
- UnsupportedEncodingException
 
- 
ReInitReinitialise.
- 
GetImageGet token literal value.
- 
GetSuffixpublic char[] GetSuffix(int len) Get the suffix.
- 
Donepublic void Done()Reset buffer when finished.
- 
adjustBeginLineColumnpublic void adjustBeginLineColumn(int newLine, int newCol) Method to adjust line and column numbers for the start of a token.
 
-