public final class HtmlInputStreamReader extends Reader implements ByteReadable, Locator
Reader
. Instead, it is the minimal implementation that does
what Tokenizer
needs while being an instance of
Reader
.
The only reason why this is a public class is that it needs to be visible to
test code in another package.Constructor and Description |
---|
HtmlInputStreamReader(InputStream inputStream,
ErrorHandler errorHandler,
Tokenizer tokenizer,
Driver driver,
Encoding encoding) |
HtmlInputStreamReader(InputStream inputStream,
ErrorHandler errorHandler,
Tokenizer tokenizer,
Driver driver,
Heuristics heuristics) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
Charset |
getCharset() |
int |
getColumnNumber() |
int |
getLineNumber() |
String |
getPublicId() |
String |
getSystemId() |
static void |
main(String[] args) |
int |
read() |
int |
read(char[] charArray) |
int |
read(char[] cbuf,
int off,
int len) |
int |
read(CharBuffer target) |
int |
readByte()
Returns the value of the next byte as an integer from 0 to 0xFF or -1 if
the stream has ended.
|
void |
switchEncoding(Encoding newEnc) |
public HtmlInputStreamReader(InputStream inputStream, ErrorHandler errorHandler, Tokenizer tokenizer, Driver driver, Heuristics heuristics) throws SAXException, IOException
inputStream
- errorHandler
- locator
- IOException
SAXException
public HtmlInputStreamReader(InputStream inputStream, ErrorHandler errorHandler, Tokenizer tokenizer, Driver driver, Encoding encoding) throws SAXException, IOException
SAXException
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class Reader
IOException
public int read(char[] charArray) throws IOException
read
in class Reader
IOException
public int readByte() throws IOException
ByteReadable
readByte
in interface ByteReadable
IOException
public static void main(String[] args)
public int getColumnNumber()
getColumnNumber
in interface Locator
public int getLineNumber()
getLineNumber
in interface Locator
public String getPublicId()
getPublicId
in interface Locator
public String getSystemId()
getSystemId
in interface Locator
public Charset getCharset()
public int read() throws IOException
read
in class Reader
IOException
Reader.read()
public int read(char[] cbuf, int off, int len) throws IOException
read
in class Reader
IOException
Reader.read(char[], int, int)
public int read(CharBuffer target) throws IOException
read
in interface Readable
read
in class Reader
IOException
Reader.read(java.nio.CharBuffer)
public void switchEncoding(Encoding newEnc)
Copyright © 2017. All rights reserved.