org.apache.jackrabbit.extractor
Class PngTextExtractor
java.lang.Object
org.apache.jackrabbit.extractor.AbstractTextExtractor
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
)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PngTextExtractor
public PngTextExtractor()
- Creates a new
PngTextExtractor
instance.
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 imagetype
- ignoredencoding
- 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-2009 The Apache Software Foundation. All Rights Reserved.