org.apache.droids.handle
Class Save

Package class diagram package Save
java.lang.Object
  extended by org.apache.droids.handle.WriterHandler
      extended by 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).


Field Summary
protected  int bufferSize
           
 
Fields inherited from class org.apache.droids.handle.WriterHandler
log
 
Constructor Summary
Save()
           
 
Method Summary
 String getOutputDir()
          Get the directory where we want to save the stream.
 void handle(InputStream stream, URL urlToHandle, Parse parse)
           
 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(String outputDir)
          Set the directory where we want to save the stream.
 
Methods inherited from class org.apache.droids.handle.WriterHandler
pipe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bufferSize

protected int bufferSize
Constructor Detail

Save

public Save()
Method Detail

handle

public void handle(InputStream stream,
                   URL urlToHandle,
                   Parse parse)
            throws Exception
Specified by:
handle in interface Handler
Parameters:
stream - the underlying stream
urlToHandle - the url we are currently processing
parse - 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