org.apache.droids.handle
Class Save
java.lang.Object
org.apache.droids.helper.Loggable
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).
- Version:
- 1.0
| Fields inherited from class org.apache.droids.helper.Loggable |
log |
|
Constructor Summary |
Save()
|
|
Method Summary |
static void |
createFile(java.io.File cache)
|
java.lang.String |
getOutputDir()
Get the directory where we want to save the stream. |
void |
handle(java.net.URI uri,
ContentEntity entity)
|
boolean |
isIncludeHost()
Do we want to prefix the export dir with the host name. |
void |
setIncludeHost(boolean includeHost)
Do we want to prefix the export dir with the host name. |
void |
setOutputDir(java.lang.String outputDir)
Set the directory where we want to save the stream. |
| 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(java.net.URI uri,
ContentEntity entity)
throws java.io.IOException
- Specified by:
handle in interface Handler
- Parameters:
uri - the uri we are currently processing
- Throws:
java.io.IOException
createFile
public static void createFile(java.io.File cache)
throws java.io.IOException
- Throws:
java.io.IOException
getOutputDir
public java.lang.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(java.lang.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 © 2007-2009. All Rights Reserved.