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

The following examples show how to use com.sun.org.apache.xerces.internal.impl.PropertyManager. 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 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 #2
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 #3
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 #4
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 #5
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 #6
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 #7
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 #8
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 #9
Source File: XMLOutputFactoryImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #10
Source File: XMLOutputFactoryImpl.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #11
Source File: XMLStreamWriterImpl.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #12
Source File: XMLOutputFactoryImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #13
Source File: XMLOutputFactoryImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #14
Source File: XMLStreamWriterImpl.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #15
Source File: XMLStreamWriterImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #16
Source File: XMLOutputFactoryImpl.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #17
Source File: XMLOutputFactoryImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #18
Source File: XMLStreamWriterImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #19
Source File: XMLStreamWriterImpl.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #20
Source File: XMLStreamWriterImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #21
Source File: XMLOutputFactoryImpl.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #22
Source File: XMLOutputFactoryImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
javax.xml.stream.XMLStreamWriter createXMLStreamWriter(javax.xml.transform.stream.StreamResult sr, String encoding) throws javax.xml.stream.XMLStreamException {
    //if factory is configured to reuse the instance & this instance can be reused
    //& the setProperty() hasn't been called
    try{
        if(fReuseInstance && fStreamWriter != null && fStreamWriter.canReuse() && !fPropertyChanged){
            fStreamWriter.reset();
            fStreamWriter.setOutput(sr, encoding);
            if(DEBUG)System.out.println("reusing instance, object id : " + fStreamWriter);
            return fStreamWriter;
        }
        return fStreamWriter = new XMLStreamWriterImpl(sr, encoding, new PropertyManager(fPropertyManager));
    }catch(java.io.IOException io){
        throw new XMLStreamException(io);
    }
}
 
Example #23
Source File: XMLStreamWriterImpl.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #24
Source File: XMLStreamWriterImpl.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Creates a new instance of XMLStreamWriterImpl. Uses platform's default
 * encoding.
 *
 * @param outputStream Underlying stream to write the bytes to
 * @param props        Properties used by this writer
 */
public XMLStreamWriterImpl(OutputStream outputStream, PropertyManager props)
    throws IOException {

    // cannot call this(outputStream, null, props); for constructor,
    // OutputStreamWriter charsetName cannot be null

    // use default encoding
    this(new OutputStreamWriter(outputStream), props);
}
 
Example #25
Source File: XMLEntityStorage.java    From openjdk-8 with GNU General Public License v2.0 4 votes vote down vote up
/** Creates a new instance of XMLEntityStorage */
public XMLEntityStorage(PropertyManager propertyManager) {
    fPropertyManager = propertyManager ;
}
 
Example #26
Source File: StaxErrorReporter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/** Creates a new instance of StaxErrorReporter */
public StaxErrorReporter(PropertyManager propertyManager) {
    super();
    putMessageFormatter(XMLMessageFormatter.XML_DOMAIN, new XMLMessageFormatter());
    reset(propertyManager);
}
 
Example #27
Source File: StaxErrorReporter.java    From Bytecoder with Apache License 2.0 4 votes vote down vote up
/**
 *One must call reset before using any of the function.
 */
public void reset(PropertyManager propertyManager){
    fXMLReporter = (XMLReporter)propertyManager.getProperty(XMLInputFactory.REPORTER);
}
 
Example #28
Source File: XMLEntityStorage.java    From openjdk-jdk9 with GNU General Public License v2.0 4 votes vote down vote up
/** Creates a new instance of XMLEntityStorage */
public XMLEntityStorage(PropertyManager propertyManager) {
    fPropertyManager = propertyManager ;
}
 
Example #29
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 #30
Source File: StaxErrorReporter.java    From hottub with GNU General Public License v2.0 4 votes vote down vote up
/**
 *One must call reset before using any of the function.
 */
public void reset(PropertyManager propertyManager){
    fXMLReporter = (XMLReporter)propertyManager.getProperty(XMLInputFactory.REPORTER);
}