Class WriteOutContentHandler

    • Constructor Detail

      • WriteOutContentHandler

        public WriteOutContentHandler​(ContentHandler handler,
                                      int writeLimit)
        Creates a content handler that writes content up to the given write limit to the given content handler.
        Parameters:
        handler - content handler to be decorated
        writeLimit - write limit
        Since:
        Apache Tika 0.10
      • WriteOutContentHandler

        public WriteOutContentHandler​(Writer writer,
                                      int writeLimit)
        Creates a content handler that writes content up to the given write limit to the given character stream.
        Parameters:
        writer - character stream
        writeLimit - write limit
        Since:
        Apache Tika 0.10
      • WriteOutContentHandler

        public WriteOutContentHandler​(Writer writer)
        Creates a content handler that writes character events to the given writer.
        Parameters:
        writer - writer
      • WriteOutContentHandler

        public WriteOutContentHandler​(int writeLimit)
        Creates a content handler that writes character events to an internal string buffer. Use the ContentHandlerDecorator.toString() method to access the collected character content.

        The internal string buffer is bounded at the given number of characters. If this write limit is reached, then a SAXException is thrown. The WriteLimitReachedException.isWriteLimitReached(Throwable) method can be used to detect this case.

        Parameters:
        writeLimit - maximum number of characters to include in the string, or -1 to disable the write limit
        Since:
        Apache Tika 0.7
      • WriteOutContentHandler

        public WriteOutContentHandler​(ContentHandler handler,
                                      int writeLimit,
                                      boolean throwOnWriteLimitReached,
                                      ParseContext parseContext)
        The default is to throw a WriteLimitReachedException
        Parameters:
        handler -
        writeLimit -
        throwOnWriteLimitReached -
        parseContext -