|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.xml.sax.helpers.DefaultHandler org.apache.tika.sax.WriteOutContentHandler
public class WriteOutContentHandler
SAX event handler that writes all character content out to
a Writer
character stream.
Constructor Summary | |
---|---|
WriteOutContentHandler()
Creates a content handler that writes character events to an internal string buffer. |
|
WriteOutContentHandler(java.io.OutputStream stream)
Creates a content handler that writes character events to the given output stream using the default encoding. |
|
WriteOutContentHandler(java.io.Writer writer)
Creates a content handler that writes character events to the given writer. |
Method Summary | |
---|---|
void |
characters(char[] ch,
int start,
int length)
Writes the given characters to the given character stream. |
void |
endDocument()
Flushes the character stream so that no characters are forgotten in internal buffers. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
Writes the given ignorable characters to the given character stream. |
java.lang.String |
toString()
Returns the contents of the internal string buffer where all the received characters have been collected. |
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endElement, endPrefixMapping, error, fatalError, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public WriteOutContentHandler(java.io.Writer writer)
writer
- writerpublic WriteOutContentHandler(java.io.OutputStream stream)
stream
- output streampublic WriteOutContentHandler()
toString()
method to access the collected character content.
Method Detail |
---|
public void characters(char[] ch, int start, int length) throws org.xml.sax.SAXException
characters
in interface org.xml.sax.ContentHandler
characters
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void ignorableWhitespace(char[] ch, int start, int length) throws org.xml.sax.SAXException
ignorableWhitespace
in interface org.xml.sax.ContentHandler
ignorableWhitespace
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
endDocument
in interface org.xml.sax.ContentHandler
endDocument
in class org.xml.sax.helpers.DefaultHandler
org.xml.sax.SAXException
- if the stream can not be flushedpublic java.lang.String toString()
StringWriter
to the
other constructor.
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |