net.sourceforge.sconman.handlers
Class PDFHandler

java.lang.Object
  extended by net.sourceforge.sconman.handlers.NullHandler
      extended by net.sourceforge.sconman.handlers.PDFHandler
All Implemented Interfaces:
IContentTypeHandler

public class PDFHandler
extends NullHandler

This filter takes a PDF input stream and generates its equivalent text input stream. It uses the PDFBox library.

Author:
mikeshadow

Constructor Summary
PDFHandler()
          Constructor for PDFHandler.
 
Method Summary
 java.io.Reader getTextReader(Content content)
          Implement this method to return a reader that provides the text associated to the content
 void writeText(java.io.InputStream is, java.io.Writer out)
          Writes all the text associated to the incoming input stream
 
Methods inherited from class net.sourceforge.sconman.handlers.NullHandler
getFieldsAsString, getInfo, hasThumbnail, writeAttributes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PDFHandler

public PDFHandler()
Constructor for PDFHandler.

Method Detail

getTextReader

public java.io.Reader getTextReader(Content content)
                             throws java.io.IOException
Description copied from interface: IContentTypeHandler
Implement this method to return a reader that provides the text associated to the content

Specified by:
getTextReader in interface IContentTypeHandler
Overrides:
getTextReader in class NullHandler
Parameters:
content - The content
Returns:
A filtered input stream
Throws:
java.io.IOException - If there's an IO problem

writeText

public void writeText(java.io.InputStream is,
                      java.io.Writer out)
               throws java.io.IOException
Description copied from interface: IContentTypeHandler
Writes all the text associated to the incoming input stream

Specified by:
writeText in interface IContentTypeHandler
Overrides:
writeText in class NullHandler
Throws:
java.io.IOException


Copyright null null. All Rights Reserved.