All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ctc.wstx.ent.UnparsedExtEntity Maven / Gradle / Ivy

Go to download

Woodstox is a high-performance XML processor that implements Stax (JSR-173), SAX2 and Stax2 APIs

The newest version!
package com.ctc.wstx.ent;

import java.io.IOException;
import java.io.Writer;
import java.net.URL;

import javax.xml.stream.Location;
import javax.xml.stream.XMLResolver;

import com.ctc.wstx.api.ReaderConfig;
import com.ctc.wstx.io.WstxInputSource;

public class UnparsedExtEntity
    extends ExtEntity
{
    final String mNotationId;

    public UnparsedExtEntity(Location loc, String name, URL ctxt,
                             String pubId, String sysId,
                             String notationId)
    {
        super(loc, name, ctxt, pubId, sysId);
        mNotationId = notationId;
    }

    @Override
    public String getNotationName() {
        return mNotationId;
    }

    /*
    ///////////////////////////////////////////
    // Implementation of abstract base methods
    ///////////////////////////////////////////
     */

    @Override
    public void writeEnc(Writer w) throws IOException
    {
        w.write("');
    }

    /*
    ///////////////////////////////////////////
    // Extended API for Wstx core
    ///////////////////////////////////////////
     */

    // // // Type information
    
    @Override
    public boolean isParsed() { return false; }
    
    @Override
    public WstxInputSource expand(WstxInputSource parent,
            XMLResolver res, ReaderConfig cfg, int xmlVersion)
    {
        // Should never get called, actually...
        throw new IllegalStateException("Internal error: createInputSource() called for unparsed (external) entity.");
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy