org.apache.droids.handle
Class Save
java.lang.Object
org.apache.droids.handle.WriterHandler
org.apache.droids.handle.Save
- All Implemented Interfaces:
- Handler
public class Save
- extends WriterHandler
- implements Handler
Handler which is writing the stream to the file system.
Before using make sure you have set the export directory
setOutputDir(String outputDir)
and whether you want to use the host
as prefix setIncludeHost(boolean includeHost)
.
Constructor Summary |
Save()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bufferSize
protected int bufferSize
Save
public Save()
handle
public void handle(InputStream stream,
URL urlToHandle,
Parse parse)
throws Exception
- Specified by:
handle
in interface Handler
- Parameters:
stream
- the underlying streamurlToHandle
- the url we are currently processingparse
- the parse object from a former processing step
- Throws:
Exception
getOutputDir
public String getOutputDir()
- Get the directory where we want to save the stream.
- Returns:
- directory where we want to save the stream.
setOutputDir
public void setOutputDir(String outputDir)
- Set the directory where we want to save the stream.
- Parameters:
outputDir
- the directory where we want to save the stream.
isIncludeHost
public boolean isIncludeHost()
- Do we want to prefix the export dir with the host name.
- Returns:
- true if we want to use the prefix; false otherwise
setIncludeHost
public void setIncludeHost(boolean includeHost)
- Do we want to prefix the export dir with the host name.
- Parameters:
includeHost
- true if we want to use the prefix; false otherwise
Copyright © 2008 The Apache Software Foundation