Package dev.pxml.core.reader.tokenizer
Class Tokenizer
- java.lang.Object
-
- dev.pxml.core.reader.tokenizer.Tokenizer
-
- All Implemented Interfaces:
ITokenizer
public class Tokenizer extends java.lang.Object implements ITokenizer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanacceptChar(char c)charcurrentChar()intcurrentColumnNumber()intcurrentLineNumber()TextLocationcurrentLocation()java.lang.ObjectgetResource()booleanisAtChar(char c)booleanisAtSpaceOrTab()booleanisAtWhiteSpace()booleanisEof()booleanisNextChar(char c)java.lang.StringpeekCurrentNChars(int n)charpeekNextChar()java.lang.StringreadAttributeValue()java.lang.StringreadComment()java.lang.StringreadName()charreadNextChar()java.lang.StringreadQuotedAttributeValue()java.lang.StringreadText()java.lang.StringreadUnquotedAttributeValue()booleanskipComment()booleanskipSpacesAndTabs()booleanskipWhiteSpace()
-
-
-
Constructor Detail
-
Tokenizer
public Tokenizer(java.io.Reader reader, java.lang.Object resource) throws java.io.IOException- Throws:
java.io.IOException
-
Tokenizer
public Tokenizer(java.lang.String string, java.lang.Object resource) throws java.io.IOException- Throws:
java.io.IOException
-
Tokenizer
public Tokenizer(java.lang.String string) throws java.io.IOException- Throws:
java.io.IOException
-
Tokenizer
public Tokenizer(java.io.File file) throws java.io.IOException- Throws:
java.io.IOException
-
-
Method Detail
-
isEof
public boolean isEof()
- Specified by:
isEofin interfaceITokenizer
-
currentChar
public char currentChar()
- Specified by:
currentCharin interfaceITokenizer
-
getResource
public java.lang.Object getResource()
- Specified by:
getResourcein interfaceITokenizer
-
currentLineNumber
public int currentLineNumber()
- Specified by:
currentLineNumberin interfaceITokenizer
-
currentColumnNumber
public int currentColumnNumber()
- Specified by:
currentColumnNumberin interfaceITokenizer
-
currentLocation
public TextLocation currentLocation()
- Specified by:
currentLocationin interfaceITokenizer
-
isAtChar
public boolean isAtChar(char c)
- Specified by:
isAtCharin interfaceITokenizer
-
isNextChar
public boolean isNextChar(char c) throws java.io.IOException- Specified by:
isNextCharin interfaceITokenizer- Throws:
java.io.IOException
-
peekNextChar
public char peekNextChar() throws java.io.IOException- Specified by:
peekNextCharin interfaceITokenizer- Throws:
java.io.IOException
-
peekCurrentNChars
public java.lang.String peekCurrentNChars(int n) throws java.io.IOException- Specified by:
peekCurrentNCharsin interfaceITokenizer- Throws:
java.io.IOException
-
acceptChar
public boolean acceptChar(char c) throws java.io.IOException- Specified by:
acceptCharin interfaceITokenizer- Throws:
java.io.IOException
-
readNextChar
public char readNextChar() throws java.io.IOException- Specified by:
readNextCharin interfaceITokenizer- Throws:
java.io.IOException
-
readName
public java.lang.String readName() throws java.io.IOException- Specified by:
readNamein interfaceITokenizer- Throws:
java.io.IOException
-
readText
public java.lang.String readText() throws java.io.IOException, PXMLDataException- Specified by:
readTextin interfaceITokenizer- Throws:
java.io.IOExceptionPXMLDataException
-
readAttributeValue
public java.lang.String readAttributeValue() throws java.io.IOException, PXMLDataException- Specified by:
readAttributeValuein interfaceITokenizer- Throws:
java.io.IOExceptionPXMLDataException
-
readQuotedAttributeValue
public java.lang.String readQuotedAttributeValue() throws java.io.IOException, PXMLDataException- Specified by:
readQuotedAttributeValuein interfaceITokenizer- Throws:
java.io.IOExceptionPXMLDataException
-
readUnquotedAttributeValue
public java.lang.String readUnquotedAttributeValue() throws java.io.IOException- Specified by:
readUnquotedAttributeValuein interfaceITokenizer- Throws:
java.io.IOException
-
skipWhiteSpace
public boolean skipWhiteSpace() throws java.io.IOException- Specified by:
skipWhiteSpacein interfaceITokenizer- Throws:
java.io.IOException
-
skipSpacesAndTabs
public boolean skipSpacesAndTabs() throws java.io.IOException- Specified by:
skipSpacesAndTabsin interfaceITokenizer- Throws:
java.io.IOException
-
isAtWhiteSpace
public boolean isAtWhiteSpace()
- Specified by:
isAtWhiteSpacein interfaceITokenizer
-
isAtSpaceOrTab
public boolean isAtSpaceOrTab()
- Specified by:
isAtSpaceOrTabin interfaceITokenizer
-
readComment
public java.lang.String readComment() throws java.io.IOException, PXMLDataException- Specified by:
readCommentin interfaceITokenizer- Throws:
java.io.IOExceptionPXMLDataException
-
skipComment
public boolean skipComment() throws java.io.IOException, PXMLDataException- Specified by:
skipCommentin interfaceITokenizer- Throws:
java.io.IOExceptionPXMLDataException
-
-