Modifier and Type | Field and Description |
---|---|
private int |
bufpos
actual position in buffer.
|
private int[] |
charbuf
character buffer.
|
private static int |
CHARBUF_SIZE
number of characters kept in buffer.
|
private int |
curcol
current column number.
|
private int |
curline
current line number.
|
private boolean |
endOfStream
has end of stream been reached?
|
private int |
lastcol
last column.
|
private boolean |
pushed
Is char pushed?
|
private java.io.Reader |
reader
Java input stream reader.
|
private int |
tabs |
private int |
tabsize
tab size in chars.
|
END_OF_STREAM
Modifier | Constructor and Description |
---|---|
protected |
StreamInJavaImpl(java.io.InputStream stream,
java.lang.String encoding,
int tabsize)
Instantiates a new StreamInJavaImpl.
|
protected |
StreamInJavaImpl(java.io.Reader reader,
int tabsize)
Instantiates a new StreamInJavaImpl.
|
Modifier and Type | Method and Description |
---|---|
int |
getCurcol()
Getter for
curcol . |
int |
getCurline()
Getter for
curline . |
boolean |
isEndOfStream()
Has end of stream been reached?
|
int |
readChar()
Read a char.
|
int |
readCharFromStream()
reads a char from the stream.
|
void |
setLexer(Lexer lexer)
Setter for lexer instance (needed for error reporting).
|
void |
ungetChar(int c)
Unget a char.
|
private static final int CHARBUF_SIZE
private int[] charbuf
private int bufpos
private java.io.Reader reader
private boolean endOfStream
private boolean pushed
private int curcol
private int lastcol
private int curline
private int tabsize
private int tabs
protected StreamInJavaImpl(java.io.InputStream stream, java.lang.String encoding, int tabsize) throws java.io.UnsupportedEncodingException
stream
- encoding
- tabsize
- java.io.UnsupportedEncodingException
protected StreamInJavaImpl(java.io.Reader reader, int tabsize)
stream
- encoding
- tabsize
- public int readCharFromStream()
StreamIn
readCharFromStream
in interface StreamIn
StreamIn.readCharFromStream()
public int readChar()
StreamIn
readChar
in interface StreamIn
StreamIn.readChar()
public void ungetChar(int c)
StreamIn
ungetChar
in interface StreamIn
c
- charStreamIn.ungetChar(int)
public boolean isEndOfStream()
StreamIn
isEndOfStream
in interface StreamIn
true
if end of stream has been reachedStreamIn.isEndOfStream()
public int getCurcol()
curcol
.public int getCurline()
curline
.getCurline
in interface StreamIn
public void setLexer(Lexer lexer)
StreamIn
setLexer
in interface StreamIn
lexer
- LexerStreamIn.setLexer(org.w3c.tidy.Lexer)