| java.lang.Object sunlabs.brazil.filter.CopyContentFilter
CopyContentFilter | public class CopyContentFilter implements Filter(Code) | | Filter to save content (of an entire site) to a disk file.
This is used to "steal" other sites. It is expected to be used
in conjunction with a
sunlabs.brazil.handler.GenericProxyHandler .
Only files that don't already exist on the local file system are
saved.
Properties:
- directoryName
- The root in the file system to save the content in
author: Stephen Uhler version: %V% CopyContentFilter.java |
filter | public byte[] filter(Request request, MimeHeaders headers, byte[] content)(Code) | | Grab the contents, and save as a file (if file doesn't already exist).
The URL is mapped into a pathname starting from directoryName
.
|
respond | public boolean respond(Request request)(Code) | | This is the request object before the content was fetched
|
shouldFilter | public boolean shouldFilter(Request request, MimeHeaders headers)(Code) | | Watch every document that passes by. If the HTTP rerun code is
"200", plan to save the content on the local file system.
|
|
|