org.apache.jackrabbit.extractor
Class PngTextExtractor

java.lang.Object
  extended by org.apache.jackrabbit.extractor.AbstractTextExtractor
      extended by org.apache.jackrabbit.extractor.PngTextExtractor
All Implemented Interfaces:
TextExtractor

public class PngTextExtractor
extends AbstractTextExtractor

Text extractor for png/apng/mng images. This class extracts the text content from tEXt chunks.

can handle image with mime types (image/png, image/apng, image/mng)


Constructor Summary
PngTextExtractor()
          Creates a new PngTextExtractor instance.
 
Method Summary
 Reader extractText(InputStream stream, String type, String encoding)
          Returns a reader for the text content of the given png image.
 
Methods inherited from class org.apache.jackrabbit.extractor.AbstractTextExtractor
getContentTypes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PngTextExtractor

public PngTextExtractor()
Creates a new PngTextExtractor instance.

Method Detail

extractText

public Reader extractText(InputStream stream,
                          String type,
                          String encoding)
                   throws IOException
Returns a reader for the text content of the given png image. Returns an empty reader if the png document could not be parsed.

Parameters:
stream - png image
type - ignored
encoding - ignored
Returns:
reader for the text content of the given png image, or an empty reader if the image could not be parsed
Throws:
IOException - if the png image stream can not be closed


Copyright © 2004-2008 The Apache Software Foundation. All Rights Reserved.