com.timeindexing.appl
Class OutputStreamer

java.lang.Object
  extended by com.timeindexing.event.OutputEventGenerator
      extended by com.timeindexing.appl.OutputStreamer
Direct Known Subclasses:
SelectionStreamer

public class OutputStreamer
extends OutputEventGenerator

A class to output any data


Field Summary
protected  Index index
           
protected  java.io.OutputStream out
           
protected  OutputPlugin outputPlugin
           
protected  IndexProperties outputProperties
           
protected  long writeCount
           
 
Fields inherited from class com.timeindexing.event.OutputEventGenerator
outputListenerList
 
Constructor Summary
OutputStreamer(Index anIndex, java.io.OutputStream output)
          Construct an OutputStreamer object given an index and an output stream.
OutputStreamer(Index anIndex, java.io.OutputStream output, OutputPlugin plugin)
          Construct an OutputStreamer object given an index and an output stream and an OutputPlugin.
 
Method Summary
 long doOutput(IndexProperties properties)
          Do some output, given some IndexProperties.
protected  IndexItem fetchIndexItem(long pos, Index index)
          Fetch a single item from an Index, ready for outputting.
 OutputPlugin getOutputPlugin()
          Get the output plugin.
 long processTimeIndex(IndexView index)
          Process the TimeIndex
 OutputStreamer setOutputPlugin(OutputPlugin plugin)
          Set an output plugin, to write to output.
 
Methods inherited from class com.timeindexing.event.OutputEventGenerator
addOutputEventListener, fireOutputEvent, getOutputEventListeners, hasOutputEventListeners, removeOutputEventListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

index

protected Index index

out

protected java.io.OutputStream out

writeCount

protected long writeCount

outputPlugin

protected OutputPlugin outputPlugin

outputProperties

protected IndexProperties outputProperties
Constructor Detail

OutputStreamer

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


OutputStreamer

public OutputStreamer(Index anIndex,
                      java.io.OutputStream output,
                      OutputPlugin plugin)
Construct an OutputStreamer object given an index and an output stream and an OutputPlugin.

Method Detail

doOutput

public long doOutput(IndexProperties properties)
              throws java.io.IOException,
                     TimeIndexException
Do some output, given some IndexProperties. This outputs the data for the whole index.

Throws:
java.io.IOException
TimeIndexException

processTimeIndex

public long processTimeIndex(IndexView index)
                      throws java.io.IOException,
                             TimeIndexException
Process the TimeIndex

Throws:
java.io.IOException
TimeIndexException

setOutputPlugin

public OutputStreamer setOutputPlugin(OutputPlugin plugin)
Set an output plugin, to write to output.


getOutputPlugin

public OutputPlugin getOutputPlugin()
Get the output plugin.


fetchIndexItem

protected IndexItem fetchIndexItem(long pos,
                                   Index index)
                            throws java.io.IOException,
                                   TimeIndexException
Fetch a single item from an Index, ready for outputting. This will follow all references to get to the data.

Throws:
java.io.IOException
TimeIndexException


Timeindexing 2008