com.timeindexing.plugin
Class DefaultOutputPlugin

java.lang.Object
  extended bycom.timeindexing.plugin.DefaultOutputPlugin
All Implemented Interfaces:
OutputPlugin

public class DefaultOutputPlugin
extends java.lang.Object
implements OutputPlugin

A class to output any data


Constructor Summary
DefaultOutputPlugin(Index anIndex, java.io.OutputStream output)
          Construct an DefaultOutputPlugin object given an index and an output stream.
DefaultOutputPlugin(Index anIndex, java.io.OutputStream output, WriterPlugin aPlugin)
          Construct an DefaultOutputPlugin object given an index and an output stream.
 
Method Summary
 java.lang.Object begin()
          Does nothing.
 java.lang.Object end()
          Close the OutputStream by default.
 Index getIndex()
          Get the index we are doing output for.
 java.io.OutputStream getOutputStream()
          Get the OutputStream for the OutputPlugin.
 WriterPlugin getWriterPlugin()
          Get the writer plugin.
 OutputPlugin setWriterPlugin(WriterPlugin writer)
          Set a writer plugin, to read input from the InputStream.
 long write(IndexItem item, IndexProperties properties)
          Do some output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultOutputPlugin

public DefaultOutputPlugin(Index anIndex,
                           java.io.OutputStream output)
Construct an DefaultOutputPlugin object given an index and an output stream. Uses the DefaultWriter plugin.


DefaultOutputPlugin

public DefaultOutputPlugin(Index anIndex,
                           java.io.OutputStream output,
                           WriterPlugin aPlugin)
Construct an DefaultOutputPlugin object given an index and an output stream.

Method Detail

getIndex

public Index getIndex()
Get the index we are doing output for.

Specified by:
getIndex in interface OutputPlugin

getOutputStream

public java.io.OutputStream getOutputStream()
Get the OutputStream for the OutputPlugin.

Specified by:
getOutputStream in interface OutputPlugin

write

public long write(IndexItem item,
                  IndexProperties properties)
           throws java.io.IOException
Do some output.

Specified by:
write in interface OutputPlugin
Parameters:
item - The IndexItem to putput
properties - Some IndexProperties
Returns:
the number of byte written
Throws:
java.io.IOException

begin

public java.lang.Object begin()
                       throws java.io.IOException
Does nothing.

Specified by:
begin in interface OutputPlugin
Throws:
java.io.IOException

end

public java.lang.Object end()
                     throws java.io.IOException
Close the OutputStream by default.

Specified by:
end in interface OutputPlugin
Throws:
java.io.IOException

setWriterPlugin

public OutputPlugin setWriterPlugin(WriterPlugin writer)
Set a writer plugin, to read input from the InputStream.

Specified by:
setWriterPlugin in interface OutputPlugin

getWriterPlugin

public WriterPlugin getWriterPlugin()
Get the writer plugin.

Specified by:
getWriterPlugin in interface OutputPlugin