Top Description Fields Constructors Methods
org.codehaus.stax2.io

public abstract Class Stax2ReferentialSource

extends Stax2Source
Class Inheritance
Known Direct Subclasses
org.codehaus.stax2.io.Stax2URLSource, org.codehaus.stax2.io.Stax2FileSource
Imports
java.io.*, java.net.URL

This is the mid-level abstract base class for Stax2Sources that refer to a resource in such a way, that an efficient InputStream or Reader can be constructed. Additionally, referenced sources also provide the base URI that allows for resolving relative references from within content read from such resources. Typical examples of references are java.net.URL and java.io.File: both for which a default implementations exist in this package
See Also
Stax2FileSource, Stax2URLSource

Field Summary

Inherited from org.codehaus.stax2.io.Stax2Source:
mEncodingmPublicIdmSystemId

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public abstract InputStream
constructInputStream()

Implements abstract org.codehaus.stax2.io.Stax2Source.constructInputStream.

This method creates an InputStream via which underlying input source can be accessed.
public abstract Reader
constructReader()

Implements abstract org.codehaus.stax2.io.Stax2Source.constructReader.

This method creates a Reader via which underlying input source can be accessed.
public abstract URL
public String
getSystemId()

Overrides org.codehaus.stax2.io.Stax2Source.getSystemId.

Implements javax.xml.transform.Source.getSystemId.

Since we can determine a system id from the base URL
Inherited from org.codehaus.stax2.io.Stax2Source:
getEncodinggetPublicIdsetEncodingsetPublicIdsetSystemId

Constructor Detail

Stax2ReferentialSourceback to summary
protected Stax2ReferentialSource()

Method Detail

constructInputStreamback to summary
public abstract InputStream constructInputStream() throws IOException

Implements abstract org.codehaus.stax2.io.Stax2Source.constructInputStream.

Doc from org.codehaus.stax2.io.Stax2Source.constructInputStream.

This method creates an InputStream via which underlying input source can be accessed. Note that caller is responsible for closing that InputSource when it is done reading it

Annotations
@Override
constructReaderback to summary
public abstract Reader constructReader() throws IOException

Implements abstract org.codehaus.stax2.io.Stax2Source.constructReader.

Doc from org.codehaus.stax2.io.Stax2Source.constructReader.

This method creates a Reader via which underlying input source can be accessed. Note that caller is responsible for closing that Reader when it is done reading it.

Annotations
@Override
getReferenceback to summary
public abstract URL getReference()

Implements abstract org.codehaus.stax2.io.Stax2Source.getReference.

Returns:URL

Doc from org.codehaus.stax2.io.Stax2Source.getReference.

URL that can be used to resolve references originating from the content read via this source; may be null if not known (which is the case for most non-referential sources)

Annotations
@Override
getSystemIdback to summary
public String getSystemId()

Overrides org.codehaus.stax2.io.Stax2Source.getSystemId.

Implements javax.xml.transform.Source.getSystemId.

Since we can determine a system id from the base URL

Returns:String

Doc from javax.xml.transform.Source.getSystemId.

The system identifier that was set with setSystemId, or null if setSystemId was not called.

Annotations
@Override