com.timeindexing.plugin
Class FileItem

java.lang.Object
  extended bycom.timeindexing.plugin.FileItem
All Implemented Interfaces:
ReaderPlugin

public class FileItem
extends java.lang.Object
implements ReaderPlugin

A plugin that takes a file input stream and returns the whole file.


Constructor Summary
FileItem(java.io.FileInputStream inStream)
          Construct a FileItem plugin from an InputStream.
 
Method Summary
 java.io.InputStream getInputStream()
          Get the InputStream for the InputPlugin.
 boolean isEOF()
          Determine if the reader has hit EOF.
 ReaderResult read()
          Get next input buffer, which will be the whole file
 ReaderPlugin setEOF()
          The reader has hit EOF.
 ReaderPlugin setInputStream(java.io.InputStream inStream)
          Set the InputStream for the InputPlugin.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileItem

public FileItem(java.io.FileInputStream inStream)
Construct a FileItem plugin from an InputStream.

Method Detail

read

public ReaderResult read()
                  throws java.io.IOException
Get next input buffer, which will be the whole file

Specified by:
read in interface ReaderPlugin
Throws:
java.io.IOException

isEOF

public boolean isEOF()
Determine if the reader has hit EOF.

Specified by:
isEOF in interface ReaderPlugin

setEOF

public ReaderPlugin setEOF()
The reader has hit EOF.

Specified by:
setEOF in interface ReaderPlugin

getInputStream

public java.io.InputStream getInputStream()
Get the InputStream for the InputPlugin.

Specified by:
getInputStream in interface ReaderPlugin

setInputStream

public ReaderPlugin setInputStream(java.io.InputStream inStream)
Set the InputStream for the InputPlugin. This must be a FileInputStream.

Specified by:
setInputStream in interface ReaderPlugin
Returns:
null if the InputStream is NOT a FileInputStream.