1
2
3
4
5
6
7
8 package net.sf.jour.rt.view.config.impl.runtime;
9
10 import javax.xml.bind.JAXBException;
11 import javax.xml.bind.ValidationEvent;
12
13 import org.xml.sax.SAXException;
14
15 import com.sun.xml.bind.unmarshaller.InterningXMLReader;
16
17 /***
18 * Filter {@link SAXUnmarshallerHandler} that interns all the Strings
19 * in the SAX events.
20 *
21 * @author
22 * Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
23 */
24 final class InterningUnmarshallerHandler extends InterningXMLReader implements SAXUnmarshallerHandler {
25
26 private final SAXUnmarshallerHandler core;
27
28 InterningUnmarshallerHandler( SAXUnmarshallerHandler core ) {
29 super();
30 setContentHandler(core);
31 this.core = core;
32 }
33
34 public void handleEvent(ValidationEvent event, boolean canRecover) throws SAXException {
35 core.handleEvent(event,canRecover);
36 }
37
38 public Object getResult() throws JAXBException, IllegalStateException {
39 return core.getResult();
40 }
41
42 }