public class SiteCapturer
extends java.lang.Object
构造器和说明 |
---|
SiteCapturer()
Create a web site capturer.
|
限定符和类型 | 方法和说明 |
---|---|
void |
capture()
Perform the capture.
|
boolean |
getCaptureResources()
Getter for property captureResources.
|
NodeFilter |
getFilter()
Getter for property filter.
|
java.lang.String |
getSource()
Getter for property source.
|
java.lang.String |
getTarget()
Getter for property target.
|
static void |
main(java.lang.String[] args)
Mainline to capture a web site locally.
|
void |
setCaptureResources(boolean capture)
Setter for property captureResources.
|
void |
setFilter(NodeFilter filter)
Setter for property filter.
|
void |
setSource(java.lang.String source)
Setter for property source.
|
void |
setTarget(java.lang.String target)
Setter for property target.
|
public java.lang.String getSource()
public void setSource(java.lang.String source)
source
- New value of property source.public java.lang.String getTarget()
public void setTarget(java.lang.String target)
target
- New value of property target.public boolean getCaptureResources()
true
, the images and other resources referenced by
the site and within the base URL tree are also copied locally to the
target directory. If false
, the image links are left 'as
is', still refering to the original site.public void setCaptureResources(boolean capture)
capture
- New value of property captureResources.public NodeFilter getFilter()
public void setFilter(NodeFilter filter)
filter
- New value of property filter.public void capture()
public static void main(java.lang.String[] args) throws java.net.MalformedURLException, java.io.IOException
args
- The command line arguments.
There are three arguments the web site to capture, the local directory
to save it to, and a flag (true or false) to indicate whether resources
such as images and video are to be captured as well.
These are requested via dialog boxes if not supplied.java.net.MalformedURLException
- If the supplied URL is invalid.java.io.IOException
- If an error occurs reading the page or resources.