com.arsdigita.search.converter
Interface Converter

All Known Implementing Classes:
BaseConverter

public interface Converter

This interface should be implemented by classes that are able to take a document and returns the a String representation of the document's contents.


Method Summary
 String convertDocument(byte[] document)
          This takes in a document represented as a byte[] and returns a text representation of that document.
 String convertDocument(File document)
          This takes the document and returns a String containing the contents of the document.
 String convertDocument(InputStream stream)
          This takes in a document represented as a byte[] and returns a text representation of that document.
 MimeType[] getMimeTypes()
          This returns an array of all MimeTypes that this converter is able to convert to a String.
 

Method Detail

convertDocument

public String convertDocument(InputStream stream)
                       throws ConversionException
This takes in a document represented as a byte[] and returns a text representation of that document.

Throws:
ConversionException

convertDocument

public String convertDocument(File document)
                       throws FileNotFoundException
This takes the document and returns a String containing the contents of the document.

Throws:
FileNotFoundException

convertDocument

public String convertDocument(byte[] document)
This takes in a document represented as a byte[] and returns a text representation of that document.


getMimeTypes

public MimeType[] getMimeTypes()
This returns an array of all MimeTypes that this converter is able to convert to a String.



Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 21 2004:2337 UTC