Package org.w3c.tidy
Class StreamInJavaImpl
- java.lang.Object
-
- org.w3c.tidy.StreamInJavaImpl
-
-
Field Summary
-
Fields inherited from interface org.w3c.tidy.StreamIn
END_OF_STREAM
-
-
Constructor Summary
Constructors Modifier Constructor 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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getCurcol()
Getter forcurcol
.int
getCurline()
Getter forcurline
.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.
-
-
-
Constructor Detail
-
StreamInJavaImpl
protected StreamInJavaImpl(java.io.InputStream stream, java.lang.String encoding, int tabsize) throws java.io.UnsupportedEncodingException
Instantiates a new StreamInJavaImpl.- Parameters:
stream
-encoding
-tabsize
-- Throws:
java.io.UnsupportedEncodingException
-
StreamInJavaImpl
protected StreamInJavaImpl(java.io.Reader reader, int tabsize)
Instantiates a new StreamInJavaImpl.- Parameters:
stream
-encoding
-tabsize
-
-
-
Method Detail
-
readCharFromStream
public int readCharFromStream()
Description copied from interface:StreamIn
reads a char from the stream.- Specified by:
readCharFromStream
in interfaceStreamIn
- Returns:
- char
- See Also:
StreamIn.readCharFromStream()
-
readChar
public int readChar()
Description copied from interface:StreamIn
Read a char.- Specified by:
readChar
in interfaceStreamIn
- Returns:
- char
- See Also:
StreamIn.readChar()
-
ungetChar
public void ungetChar(int c)
Description copied from interface:StreamIn
Unget a char.- Specified by:
ungetChar
in interfaceStreamIn
- Parameters:
c
- char- See Also:
StreamIn.ungetChar(int)
-
isEndOfStream
public boolean isEndOfStream()
Description copied from interface:StreamIn
Has end of stream been reached?- Specified by:
isEndOfStream
in interfaceStreamIn
- Returns:
true
if end of stream has been reached- See Also:
StreamIn.isEndOfStream()
-
getCurcol
public int getCurcol()
Getter forcurcol
.
-
getCurline
public int getCurline()
Getter forcurline
.- Specified by:
getCurline
in interfaceStreamIn
- Returns:
- Returns the curline.
-
setLexer
public void setLexer(Lexer lexer)
Description copied from interface:StreamIn
Setter for lexer instance (needed for error reporting).- Specified by:
setLexer
in interfaceStreamIn
- Parameters:
lexer
- Lexer- See Also:
StreamIn.setLexer(org.w3c.tidy.Lexer)
-
-