|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.sauronsoftware.grab4j.WebGrabber
public class WebGrabber
This is the grabber. The documentation about the grab4j scripting features is given inside the distribution package.
Constructor Summary | |
---|---|
WebGrabber()
|
Method Summary | |
---|---|
static java.lang.Object |
grab(HTMLDocument document,
java.io.File jsLogicFile)
This method grabs a HTML document. |
static java.lang.Object |
grab(HTMLDocument document,
java.io.Reader jsLogicReader)
This method grabs a HTML document. |
static java.lang.Object |
grab(HTMLDocument document,
java.lang.String jsLogic)
This method grabs a HTML document. |
static java.lang.Object |
grab(java.net.URL url,
java.io.File jsLogicFile)
This method fetches, parses and grabs a HTML document. |
static java.lang.Object |
grab(java.net.URL url,
java.io.Reader jsLogicReader)
This method fetches, parses and grabs a HTML document. |
static java.lang.Object |
grab(java.net.URL url,
java.lang.String jsLogic)
This method fetches, parses and grabs a HTML document. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WebGrabber()
Method Detail |
---|
public static java.lang.Object grab(java.net.URL url, java.lang.String jsLogic) throws java.io.IOException, HTMLParseException, ScriptException
url
- The document address as an URL object.jsLogic
- The script implementing the grabbing logic, as a string of
JavaScript code.
java.io.IOException
- If an I/O error occurs during the document retrieving.
HTMLParseException
- If the file retrieved isn't a valid HTML document.
ScriptException
- If the grabbing script fails.public static java.lang.Object grab(java.net.URL url, java.io.Reader jsLogicReader) throws java.io.IOException, HTMLParseException, ScriptException
url
- The document address as an URL object.jsLogicReader
- The script implementing the grabbing logic, as a reader from
which will be read the JavaScript code. Note that this reader
will be closed by the method.
java.io.IOException
- If an I/O error occurs during the document or the script
retrieving.
HTMLParseException
- If the file retrieved isn't a valid HTML document.
ScriptException
- If the grabbing script fails.public static java.lang.Object grab(java.net.URL url, java.io.File jsLogicFile) throws java.io.IOException, HTMLParseException, ScriptException
url
- The document address as an URL object.jsLogicFile
- The script implementing the grabbing logic, as a file
containing the JavaScript code.
java.io.IOException
- If an I/O error occurs during the document or the script
retrieving.
HTMLParseException
- If the file retrieved isn't a valid HTML document.
ScriptException
- If the grabbing script fails.public static java.lang.Object grab(HTMLDocument document, java.io.Reader jsLogicReader) throws java.io.IOException, ScriptException
document
- The already parsed HTML document.jsLogicReader
- The script implementing the grabbing logic, as a reader from
which will be read the JavaScript code. Note that this reader
will be closed by the method.
java.io.IOException
- If an I/O error occurs during the script retrieving.
ScriptException
- If the grabbing script fails.public static java.lang.Object grab(HTMLDocument document, java.io.File jsLogicFile) throws java.io.IOException, ScriptException
document
- The already parsed HTML document.jsLogicFile
- The script implementing the grabbing logic, as a file
containing the JavaScript code.
java.io.IOException
- If an I/O error occurs during the script retrieving.
ScriptException
- If the grabbing script fails.public static java.lang.Object grab(HTMLDocument document, java.lang.String jsLogic) throws ScriptException
document
- The already parsed HTML document.jsLogic
- The script implementing the grabbing logic, as a string of
JavaScript code.
ScriptException
- If the grabbing script fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |