com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl Java Examples

The following examples show how to use com.sun.org.apache.xerces.internal.impl.XMLStreamReaderImpl. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XMLInputFactoryImpl.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #2
Source File: XMLInputFactoryImpl.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #3
Source File: XMLInputFactoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #4
Source File: XMLInputFactoryImpl.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #5
Source File: XMLInputFactoryImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #6
Source File: XMLInputFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #7
Source File: XMLInputFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #8
Source File: XMLInputFactoryImpl.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #9
Source File: XMLInputFactoryImpl.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
XMLStreamReader getXMLStreamReaderImpl(XMLInputSource inputSource) throws javax.xml.stream.XMLStreamException{
    //1. if the temp reader is null -- create the instance and return
    if(fTempReader == null){
        fPropertyChanged = false;
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    if(fReuseInstance && fTempReader.canReuse() && !fPropertyChanged){
        if(DEBUG)System.out.println("Reusing the instance");
        //we can make setInputSource() call reset() and this way there wont be two function calls
        fTempReader.reset();
        fTempReader.setInputSource(inputSource);
        fPropertyChanged = false;
        return fTempReader;
    }else{
        fPropertyChanged = false;
        //just return the new instance.. note that we are not setting  fTempReader to the newly created instance
        return fTempReader = new XMLStreamReaderImpl(inputSource,
                new PropertyManager(fPropertyManager));
    }
}
 
Example #10
Source File: XMLInputFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #11
Source File: XMLInputFactoryImpl.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #12
Source File: XMLInputFactoryImpl.java    From TencentKona-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #13
Source File: XMLInputFactoryImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #14
Source File: XMLInputFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #15
Source File: XMLInputFactoryImpl.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #16
Source File: XMLInputFactoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #17
Source File: XMLInputFactoryImpl.java    From jdk8u60 with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}
 
Example #18
Source File: XMLInputFactoryImpl.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
public XMLStreamReader createXMLStreamReader(Source source) throws XMLStreamException {
    return new XMLStreamReaderImpl(jaxpSourcetoXMLInputSource(source),
            new PropertyManager(fPropertyManager));
}