Class HTMLScanner.CurrentEntity
java.lang.Object
org.htmlunit.cyberneko.HTMLScanner.CurrentEntity
- Enclosing class:
HTMLScanner
Current entity.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal StringBase system identifier.(package private) char[]Character buffer.(package private) intCharacter offset in the file.(package private) intColumn number.(package private) StringEncoding.private boolean(package private) final StringExpanded system identifier.(package private) intLength of characters read into character buffer.private intLine number.final StringLiteral system identifier.(package private) intOffset into character buffer.final StringPublic identifier.private ReaderCharacter stream.final StringXML version. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) voidprivate voiddebugBufferIfNeeded(String prefix) Prints the contents of the character buffer to standard out.private voiddebugBufferIfNeeded(String prefix, String suffix) Prints the contents of the character buffer to standard out.(package private) int(package private) int(package private) charint(package private) char(package private) booleanhasNext()Indicates if there are characters left.(package private) voidincLine()(package private) voidincLine(int nbLines) protected intload(int loadOffset) Loads a new chunk of data into the buffer and returns the number of characters loaded or -1 if no additional characters were loaded.protected intread()(package private) voidresetBuffer(XMLString xmlBuffer, int lineNumber, int columnNumber, int characterOffset) (package private) voidrewind()Goes back, cancelling the effect of the previous read() call.(package private) voidrewind(int i) (package private) void
-
Field Details
-
stream_
Character stream. -
encoding_
String encoding_Encoding. -
publicId
Public identifier. -
baseSystemId
Base system identifier. -
literalSystemId
Literal system identifier. -
expandedSystemId
Expanded system identifier. -
version
-
lineNumber_
private int lineNumber_Line number. -
columnNumber_
int columnNumber_Column number. -
characterOffset_
int characterOffset_Character offset in the file. -
buffer_
char[] buffer_Character buffer. -
offset_
int offset_Offset into character buffer. -
length_
int length_Length of characters read into character buffer. -
endReached_
private boolean endReached_
-
-
Constructor Details
-
CurrentEntity
-
-
Method Details
-
getCurrentChar
char getCurrentChar() -
getNextChar
char getNextChar()- Returns:
- the current character and moves to next one.
-
closeQuietly
void closeQuietly() -
hasNext
boolean hasNext()Indicates if there are characters left. -
load
Loads a new chunk of data into the buffer and returns the number of characters loaded or -1 if no additional characters were loaded.- Parameters:
loadOffset- The offset at which new characters should be loaded.- Returns:
- count
- Throws:
IOException- in case of io problems
-
read
- Throws:
IOException
-
debugBufferIfNeeded
Prints the contents of the character buffer to standard out. -
debugBufferIfNeeded
-
setStream
-
rewind
void rewind()Goes back, cancelling the effect of the previous read() call. -
rewind
void rewind(int i) -
incLine
void incLine() -
incLine
void incLine(int nbLines) -
getLineNumber
public int getLineNumber() -
resetBuffer
-
getColumnNumber
int getColumnNumber() -
getCharacterOffset
int getCharacterOffset()
-