Class WPStringExtractor


  • public class WPStringExtractor
    extends StringExtractor
    A StringExtractor extension optimized for processing WordPerfect document streams.

    This class is made available as a utility class as other file formats may also use WordPerfect's file structure, e.g. Corel Presentations 3.0 files.

    • Constructor Detail

      • WPStringExtractor

        public WPStringExtractor()
    • Method Detail

      • extract

        public String extract​(InputStream stream)
                       throws IOException
        Wraps the specified InputStream in a WPFilterInputStream and passes it to the super class.
        Overrides:
        extract in class StringExtractor
        Parameters:
        stream - The InputStream to read the bytes from. The stream will be fully consumed but not closed.
        Returns:
        The resulting, heuristically determined text. A String is always returned, although it can be empty.
        Throws:
        IOException - When reading characters from the InputStream caused an IOException.