1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.tika.sax;
18
19 import org.xml.sax.Attributes;
20 import org.xml.sax.ContentHandler;
21 import org.xml.sax.Locator;
22 import org.xml.sax.SAXException;
23 import org.xml.sax.helpers.DefaultHandler;
24
25
26
27
28
29
30
31 public class ContentHandlerDecorator extends DefaultHandler {
32
33
34
35
36 private final ContentHandler handler;
37
38
39
40
41
42
43 public ContentHandlerDecorator(ContentHandler handler) {
44 this.handler = handler;
45 }
46
47 public void startPrefixMapping(String prefix, String uri)
48 throws SAXException {
49 handler.startPrefixMapping(prefix, uri);
50 }
51
52 public void endPrefixMapping(String prefix) throws SAXException {
53 handler.endPrefixMapping(prefix);
54 }
55
56 public void processingInstruction(String target, String data)
57 throws SAXException {
58 handler.processingInstruction(target, data);
59 }
60
61 public void setDocumentLocator(Locator locator) {
62 handler.setDocumentLocator(locator);
63 }
64
65 public void startDocument() throws SAXException {
66 handler.startDocument();
67 }
68
69 public void endDocument() throws SAXException {
70 handler.endDocument();
71 }
72
73 public void startElement(String uri, String localName, String name,
74 Attributes atts) throws SAXException {
75 handler.startElement(uri, localName, name, atts);
76 }
77
78 public void endElement(String uri, String localName, String name)
79 throws SAXException {
80 handler.endElement(uri, localName, name);
81 }
82
83 public void characters(char[] ch, int start, int length)
84 throws SAXException {
85 handler.characters(ch, start, length);
86 }
87
88 public void ignorableWhitespace(char[] ch, int start, int length)
89 throws SAXException {
90 handler.ignorableWhitespace(ch, start, length);
91 }
92
93 public void skippedEntity(String name) throws SAXException {
94 handler.skippedEntity(name);
95 }
96
97 public String toString() {
98 return handler.toString();
99 }
100
101 }