View Javadoc

1   /*
2    * Copyright 2005 Jukka Zitting <jz@yukatan.fi>
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  package net.sf.exorcist.multi;
17  
18  import org.xml.sax.Attributes;
19  import org.xml.sax.ContentHandler;
20  import org.xml.sax.SAXException;
21  import org.xml.sax.helpers.DefaultHandler;
22  
23  public class MultiHandler extends DefaultHandler {
24  
25      private final ContentHandler handler;
26  
27      public MultiHandler(ContentHandler handler) {
28          this.handler = handler;
29      }
30  
31      public void characters(char[] ch, int start, int length)
32              throws SAXException {
33          handler.characters(ch, start, length);
34      }
35  
36      public void endElement(String uri, String localName, String qName)
37              throws SAXException {
38          handler.endElement(uri, localName, qName);
39      }
40  
41      public void endPrefixMapping(String prefix) throws SAXException {
42          handler.endPrefixMapping(prefix);
43      }
44  
45      public void ignorableWhitespace(char[] ch, int start, int length)
46              throws SAXException {
47          handler.ignorableWhitespace(ch, start, length);
48      }
49  
50      public void skippedEntity(String name) throws SAXException {
51          handler.skippedEntity(name);
52      }
53  
54      public void startElement(
55              String uri, String localName, String qName, Attributes attributes)
56              throws SAXException {
57          handler.startElement(uri, localName, qName, attributes);
58      }
59  
60      public void startPrefixMapping(String prefix, String uri)
61              throws SAXException {
62          handler.startPrefixMapping(prefix, uri);
63      }
64  
65  }