Package gnu.kawa.sax
Class ContentConsumer
java.lang.Object
gnu.kawa.sax.ContentConsumer
- All Implemented Interfaces:
Consumer,Appendable,Consumer<Object>,DoubleConsumer,IntConsumer,LongConsumer
- Direct Known Subclasses:
KawaXMLReader
Forward Consumer events to a SAX2 ContentHandler.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(char c) append(CharSequence csq) append(CharSequence csq, int start, int end) voidEnd of an attribute or end of an actual parameter.voidvoidvoidvoiderror(String method, SAXException ex) voidfinalize()booleanignoring()True if consumer is ignoring rest of element.voidsetContentHandler(ContentHandler handler) voidstartAttribute(Object attrType) Write a attribute for the current element.voidvoidstartElement(Object type) voidwrite(char[] buf, int off, int len) voidwrite(int v) voidwrite(CharSequence str, int start, int length) voidvoidwriteBoolean(boolean v) voidwriteDouble(double v) voidwriteFloat(float v) voidwriteInt(int v) voidwriteLong(long v) voidMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.function.DoubleConsumer
andThenMethods inherited from interface java.util.function.IntConsumer
andThenMethods inherited from interface java.util.function.LongConsumer
andThen
-
Constructor Details
-
ContentConsumer
public ContentConsumer() -
ContentConsumer
-
-
Method Details
-
error
-
endStartTag
public void endStartTag() -
startElement
- Specified by:
startElementin interfaceConsumer
-
startAttribute
Description copied from interface:ConsumerWrite a attribute for the current element. This is only allowed immediately after a startElement.- Specified by:
startAttributein interfaceConsumer
-
endAttribute
public void endAttribute()Description copied from interface:ConsumerEnd of an attribute or end of an actual parameter. The former use matches a startAttribute; the latter may not, and can be used to separate parameters in a parameter list. This double duty suggsts the method should at least be re-named.- Specified by:
endAttributein interfaceConsumer
-
startDocument
public void startDocument()- Specified by:
startDocumentin interfaceConsumer
-
endDocument
public void endDocument()- Specified by:
endDocumentin interfaceConsumer
-
endElement
public void endElement()- Specified by:
endElementin interfaceConsumer
-
write
public void write(char[] buf, int off, int len) -
write
public void write(int v) -
write
-
write
-
append
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
append
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
append
- Specified by:
appendin interfaceAppendable- Specified by:
appendin interfaceConsumer
-
writeObject
- Specified by:
writeObjectin interfaceConsumer
-
writeBoolean
public void writeBoolean(boolean v) - Specified by:
writeBooleanin interfaceConsumer
-
writeLong
public void writeLong(long v) -
writeInt
public void writeInt(int v) -
writeFloat
public void writeFloat(float v) - Specified by:
writeFloatin interfaceConsumer
-
writeDouble
public void writeDouble(double v) - Specified by:
writeDoublein interfaceConsumer
-
finalize
public void finalize() -
ignoring
public boolean ignoring()Description copied from interface:ConsumerTrue if consumer is ignoring rest of element. The producer can use this information to skip ahead. -
setContentHandler
-
getContentHandler
-