//only constructor will do because we delegate everything to underlying XMLStreamReader
public XMLEventReaderImpl(XMLStreamReader reader) throws XMLStreamException {
fXMLReader = reader ;
fXMLEventAllocator = (XMLEventAllocator)reader.getProperty(XMLInputFactory.ALLOCATOR);
if(fXMLEventAllocator == null){
fXMLEventAllocator = new XMLEventAllocatorImpl();
}
fPeekedEvent = fXMLEventAllocator.allocate(fXMLReader);
}