All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----jp.kyasu.graphics.html.HTMLReader
HTMLReader
class implements the reader that reads the
HTML document ('text/html
') and renders it into the
HTMLText
object or HTMLReaderTarget
object.
For example:
URL url = null; try { url = new URL("http://ring.aist.go.jp/openlab/kyasu/"); } catch (MalformedURLException e) { return; } HTMLReader htmlReader = new HTMLReader(new HTMLStyle()); HTMLText htmlText = null; try { htmlText = htmlReader.readFrom(url); } catch (IOException e) { return; }
This class does not support the following tags:
TABLE, FORM, FRAME, APPLET,.etc.
A
).
text/html
') from the specified
url and renders it into the HTMLReaderTarget
object.
text/html
') from the specified
reader with the url of the HTML document, and renders it into the
HTMLReaderTarget
object.
text/html
') from the specified
url with the specified encoding, and renders it into the
HTMLReaderTarget
object.
text/html
') from the specified
url and renders it into the HTMLText
object.
text/html
') from the specified
reader with the url of the HTML document, and renders it into the
HTMLText
object.
text/html
') from the specified
url with the specified encoding, and renders it into the
HTMLText
object.
public HTMLReader(HTMLStyle htmlStyle)
public HTMLReader(HTMLStyle htmlStyle, ActionListener linkActionListener)
A
).
A
). If null
,
the created HTMLText
becomes
non clickable.
public HTMLText readFrom(URL url) throws IOException
text/html
') from the specified
url and renders it into the HTMLText
object.
HTMLText
object.
text/html
'.
public HTMLText readFrom(URL url, String encodingName) throws IOException
text/html
') from the specified
url with the specified encoding, and renders it into the
HTMLText
object.
HTMLText
object.
text/html
'.
public HTMLText readFrom(URL documentURL, Reader reader) throws IOException
text/html
') from the specified
reader with the url of the HTML document, and renders it into the
HTMLText
object.
HTMLText
object.
public void read(URL url, HTMLReaderTarget target) throws IOException
text/html
') from the specified
url and renders it into the HTMLReaderTarget
object.
HTMLReaderTarget
into which to render.
text/html
'.
public void read(URL url, String encodingName, HTMLReaderTarget target) throws IOException
text/html
') from the specified
url with the specified encoding, and renders it into the
HTMLReaderTarget
object.
HTMLReaderTarget
into which
to render.
text/html
'.
public void read(URL documentURL, Reader reader, HTMLReaderTarget target) throws IOException
text/html
') from the specified
reader with the url of the HTML document, and renders it into the
HTMLReaderTarget
object.
HTMLReaderTarget
into which
to render.
public synchronized void interruptReading()
public void startTagParsed(SGMLEvent e) throws IOException
public void endTagParsed(SGMLEvent e) throws IOException
public void cdataParsed(SGMLEvent e) throws IOException
public void parsingFinished(SGMLEvent e) throws IOException
All Packages Class Hierarchy This Package Previous Next Index