|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.sauronsoftware.grab4j.html.HTMLDocumentFactory
public class HTMLDocumentFactory
A factory for HTML document representations. Call this class buildDocument() static method to fetch and parse a HTML document.
Constructor Summary | |
---|---|
HTMLDocumentFactory()
|
Method Summary | |
---|---|
static HTMLDocument |
buildDocument(org.xml.sax.InputSource inputSource)
This method reads and parses a HTML document. |
static HTMLDocument |
buildDocument(java.io.InputStream inputStream)
This method reads and parses a HTML document. |
static HTMLDocument |
buildDocument(java.io.Reader reader)
This method reads and parses a HTML document. |
static HTMLDocument |
buildDocument(java.lang.String documentUrl)
This method fetches and parses a HTML document. |
static HTMLDocument |
buildDocument(java.net.URL documentUrl)
This method fetches and parses a HTML document. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HTMLDocumentFactory()
Method Detail |
---|
public static HTMLDocument buildDocument(java.net.URL documentUrl) throws java.io.IOException, HTMLParseException
documentUrl
- The document URL.
java.io.IOException
- This exception is thrown if an I/O error occurs.
HTMLParseException
- This exception is thrown if the document cannot be parsed,
since it doesn't result to be valid HTML.public static HTMLDocument buildDocument(java.lang.String documentUrl) throws java.io.IOException, HTMLParseException
documentUrl
- The document URL, as a string.
java.io.IOException
- This exception is thrown if an I/O error occurs.
HTMLParseException
- This exception is thrown if the document cannot be parsed,
since it doesn't result to be valid HTML.public static HTMLDocument buildDocument(java.io.Reader reader) throws java.io.IOException, HTMLParseException
reader
- The reader from which the document will be read.
java.io.IOException
- This exception is thrown if an I/O error occurs
HTMLParseException
- This exception is thrown if the document cannot be parsed,
since it doesn't result to be valid HTML.public static HTMLDocument buildDocument(java.io.InputStream inputStream) throws java.io.IOException, HTMLParseException
inputStream
- The inputStream from which the document will be read.
java.io.IOException
- This exception is thrown if an I/O error occurs
HTMLParseException
- This exception is thrown if the document cannot be parsed,
since it doesn't result to be valid HTML.public static HTMLDocument buildDocument(org.xml.sax.InputSource inputSource) throws java.io.IOException, HTMLParseException
inputSource
- The inputSource from which the document will be read.
java.io.IOException
- This exception is thrown if an I/O error occurs
HTMLParseException
- This exception is thrown if the document cannot be parsed,
since it doesn't result to be valid HTML.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |