com.timeindexing.plugin
Class DefaultWriter

java.lang.Object
  extended by com.timeindexing.plugin.DefaultWriter
All Implemented Interfaces:
WriterPlugin

public class DefaultWriter
extends java.lang.Object
implements WriterPlugin

An default writer plugin. Takes an IndexItem and writes the bytes to the output stream.


Constructor Summary
DefaultWriter()
          Construct a DefaultWriter.
DefaultWriter(java.io.OutputStream out)
          Construct a DefaultWriter given an OutputStream.
 
Method Summary
 java.lang.Object begin()
          Called as the first thing.
 java.lang.Object end()
          Called as the last thing.
 long flush()
          Flush out any remainig data.
 java.io.OutputStream getOutputStream()
          Get the OutputStream for the OutputPlugin.
 WriterPlugin setOutputStream(java.io.OutputStream outStream)
          Set the OutputStream for the OutputPlugin.
 long write(IndexItem item, IndexProperties outputProperties)
          Output properties include: "eolmark" -> "newline" ->
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWriter

public DefaultWriter()
Construct a DefaultWriter.


DefaultWriter

public DefaultWriter(java.io.OutputStream out)
Construct a DefaultWriter given an OutputStream.

Method Detail

write

public long write(IndexItem item,
                  IndexProperties outputProperties)
           throws java.io.IOException
Output properties include:

Specified by:
write in interface WriterPlugin
Throws:
java.io.IOException

flush

public long flush()
           throws java.io.IOException
Flush out any remainig data.

Specified by:
flush in interface WriterPlugin
Throws:
java.io.IOException

getOutputStream

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

Specified by:
getOutputStream in interface WriterPlugin

setOutputStream

public WriterPlugin setOutputStream(java.io.OutputStream outStream)
Set the OutputStream for the OutputPlugin.

Specified by:
setOutputStream in interface WriterPlugin

begin

public java.lang.Object begin()
                       throws java.io.IOException
Called as the first thing. Useful for doing any processing before output starts.

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

end

public java.lang.Object end()
                     throws java.io.IOException
Called as the last thing. Useful for doing any processing after output has finished.

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


Timeindexing 2008