1 package javax.xml.stream.util; 2 3 import javax.xml.namespace.QName ; 4 import javax.xml.namespace.NamespaceContext ; 5 import javax.xml.stream.XMLEventReader; 6 import javax.xml.stream.events.XMLEvent; 7 import javax.xml.stream.Location; 8 import javax.xml.stream.XMLStreamException; 9 10 25 26 public class EventReaderDelegate implements XMLEventReader { 27 private XMLEventReader reader; 28 29 32 public EventReaderDelegate(){} 33 34 38 public EventReaderDelegate(XMLEventReader reader) { 39 this.reader = reader; 40 } 41 42 46 public void setParent(XMLEventReader reader) { 47 this.reader = reader; 48 } 49 50 54 public XMLEventReader getParent() { 55 return reader; 56 } 57 58 public XMLEvent nextEvent() 59 throws XMLStreamException 60 { 61 return reader.nextEvent(); 62 } 63 64 public Object next() { 65 return reader.next(); 66 } 67 68 public boolean hasNext() 69 { 70 return reader.hasNext(); 71 } 72 73 public XMLEvent peek() 74 throws XMLStreamException 75 { 76 return reader.peek(); 77 } 78 79 public void close() 80 throws XMLStreamException 81 { 82 reader.close(); 83 } 84 85 public String getElementText() 86 throws XMLStreamException 87 { 88 return reader.getElementText(); 89 } 90 91 public XMLEvent nextTag() 92 throws XMLStreamException 93 { 94 return reader.nextTag(); 95 } 96 97 public Object getProperty(java.lang.String name) 98 throws java.lang.IllegalArgumentException 99 { 100 return reader.getProperty(name); 101 } 102 103 public void remove() { 104 reader.remove(); 105 } 106 } 107 | Popular Tags |