Top Description Fields Constructors Methods
com.sun.org.apache.xerces.internal.xni.parser

public Class XMLInputSource

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.org.apache.xerces.internal.impl.xs.util.XSInputSource, com.sun.org.apache.xerces.internal.util.HTTPInputSource, com.sun.org.apache.xerces.internal.util.DOMInputSource, com.sun.org.apache.xerces.internal.util.SAXInputSource, com.sun.org.apache.xerces.internal.util.StAXInputSource
Imports
com.sun.org.apache.xerces.internal.xni.XMLResourceIdentifier, java.io.InputStream, .Reader, org.xml.sax.InputSource

This class represents an input source for an XML document. The basic properties of an input source are the following:
Author
Andy Clark, IBM

Field Summary

Modifier and TypeField and Description
protected String
fBaseSystemId

Base system identifier.

protected InputStream
fByteStream

Byte stream.

protected Reader
fCharStream

Character stream.

protected String
fEncoding

Encoding.

pack-priv boolean
protected String
fPublicId

Public identifier.

protected String
fSystemId

System identifier.

Constructor Summary

AccessConstructor and Description
public
XMLInputSource(String
The public identifier, if known.
publicId
,
String
The system identifier. This value should always be set, if possible, and can be relative or absolute. If the system identifier is relative, then the base system identifier should be set.
systemId
,
String
The base system identifier. This value should always be set to the fully expanded URI of the base system identifier, if possible.
baseSystemId
,
boolean
a flag to indicate whether the source is created by a resolver
isCreatedByResolver
)

Constructs an input source from just the public and system identifiers, leaving resolution of the entity and opening of the input stream up to the caller.

public
XMLInputSource(XMLResourceIdentifier
the XMLResourceIdentifier containing the information
resourceIdentifier
)

Constructs an input source from a XMLResourceIdentifier object, leaving resolution of the entity and opening of the input stream up to the caller.

public
XMLInputSource(InputSource
a SAX InputSource
inputSource
,
boolean
a flag to indicate whether the source is created by a resolver
isCreatedByResolver
)

Constructs an input source from a SAX InputSource object.

public
XMLInputSource(String
The public identifier, if known.
publicId
,
String
The system identifier. This value should always be set, if possible, and can be relative or absolute. If the system identifier is relative, then the base system identifier should be set.
systemId
,
String
The base system identifier. This value should always be set to the fully expanded URI of the base system identifier, if possible.
baseSystemId
,
InputStream
The byte stream.
byteStream
,
String
The encoding of the byte stream, if known.
encoding
)

Constructs an input source from a byte stream.

public
XMLInputSource(String
The public identifier, if known.
publicId
,
String
The system identifier. This value should always be set, if possible, and can be relative or absolute. If the system identifier is relative, then the base system identifier should be set.
systemId
,
String
The base system identifier. This value should always be set to the fully expanded URI of the base system identifier, if possible.
baseSystemId
,
Reader
The character stream.
charStream
,
String
The original encoding of the byte stream used by the reader, if known.
encoding
)

Constructs an input source from a character stream.

Method Summary

Modifier and TypeMethod and Description
public String
getBaseSystemId()

Returns the base system identifier.

public InputStream
getByteStream()

Returns the byte stream.

public Reader
getCharacterStream()

Returns the character stream.

public String
getEncoding()

Returns the encoding of the stream, or null if not known.

public String
getPublicId()

Returns the public identifier.

public String
getSystemId()

Returns the system identifier.

public boolean

Returns:

true if the source is created by a resolver, false otherwise
isCreatedByResolver
()

Returns a boolean to indicate whether this source is created by a resolver.

public void
setBaseSystemId(String
The new base system identifier.
baseSystemId
)

Sets the base system identifier.

public void
setByteStream(InputStream
The new byte stream.
byteStream
)

Sets the byte stream.

public void
setCharacterStream(Reader
The new character stream.
charStream
)

Sets the character stream.

public void
setCreatedByResolver(boolean
the flag
createdByResolver
)

Sets the flag to indicate whether this source is created by a resolver

public void
setEncoding(String
The new encoding.
encoding
)

Sets the encoding of the stream.

public void
setPublicId(String
The new public identifier.
publicId
)

Sets the public identifier.

public void
setSystemId(String
The new system identifier.
systemId
)

Sets the system identifier.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fBaseSystemIdback to summary
protected String fBaseSystemId

Base system identifier.

fByteStreamback to summary
protected InputStream fByteStream

Byte stream.

fCharStreamback to summary
protected Reader fCharStream

Character stream.

fEncodingback to summary
protected String fEncoding

Encoding.

fIsCreatedByResolverback to summary
pack-priv boolean fIsCreatedByResolver
fPublicIdback to summary
protected String fPublicId

Public identifier.

fSystemIdback to summary
protected String fSystemId

System identifier.

Constructor Detail

XMLInputSourceback to summary
public XMLInputSource(String publicId, String systemId, String baseSystemId, boolean isCreatedByResolver)

Constructs an input source from just the public and system identifiers, leaving resolution of the entity and opening of the input stream up to the caller.

Parameters
publicId:String

The public identifier, if known.

systemId:String

The system identifier. This value should always be set, if possible, and can be relative or absolute. If the system identifier is relative, then the base system identifier should be set.

baseSystemId:String

The base system identifier. This value should always be set to the fully expanded URI of the base system identifier, if possible.

isCreatedByResolver:boolean

a flag to indicate whether the source is created by a resolver

XMLInputSourceback to summary
public XMLInputSource(XMLResourceIdentifier resourceIdentifier)

Constructs an input source from a XMLResourceIdentifier object, leaving resolution of the entity and opening of the input stream up to the caller.

Parameters
resourceIdentifier:XMLResourceIdentifier

the XMLResourceIdentifier containing the information

XMLInputSourceback to summary
public XMLInputSource(InputSource inputSource, boolean isCreatedByResolver)

Constructs an input source from a SAX InputSource object.

Parameters
inputSource:InputSource

a SAX InputSource

isCreatedByResolver:boolean

a flag to indicate whether the source is created by a resolver

XMLInputSourceback to summary
public XMLInputSource(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding)

Constructs an input source from a byte stream.

Parameters
publicId:String

The public identifier, if known.

systemId:String

The system identifier. This value should always be set, if possible, and can be relative or absolute. If the system identifier is relative, then the base system identifier should be set.

baseSystemId:String

The base system identifier. This value should always be set to the fully expanded URI of the base system identifier, if possible.

byteStream:InputStream

The byte stream.

encoding:String

The encoding of the byte stream, if known.

XMLInputSourceback to summary
public XMLInputSource(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding)

Constructs an input source from a character stream.

Parameters
publicId:String

The public identifier, if known.

systemId:String

The system identifier. This value should always be set, if possible, and can be relative or absolute. If the system identifier is relative, then the base system identifier should be set.

baseSystemId:String

The base system identifier. This value should always be set to the fully expanded URI of the base system identifier, if possible.

charStream:Reader

The character stream.

encoding:String

The original encoding of the byte stream used by the reader, if known.

Method Detail

getBaseSystemIdback to summary
public String getBaseSystemId()

Returns the base system identifier.

getByteStreamback to summary
public InputStream getByteStream()

Returns the byte stream.

getCharacterStreamback to summary
public Reader getCharacterStream()

Returns the character stream.

getEncodingback to summary
public String getEncoding()

Returns the encoding of the stream, or null if not known.

getPublicIdback to summary
public String getPublicId()

Returns the public identifier.

getSystemIdback to summary
public String getSystemId()

Returns the system identifier.

isCreatedByResolverback to summary
public boolean isCreatedByResolver()

Returns a boolean to indicate whether this source is created by a resolver.

Returns:boolean

true if the source is created by a resolver, false otherwise

setBaseSystemIdback to summary
public void setBaseSystemId(String baseSystemId)

Sets the base system identifier.

Parameters
baseSystemId:String

The new base system identifier.

setByteStreamback to summary
public void setByteStream(InputStream byteStream)

Sets the byte stream. If the byte stream is not already opened when this object is instantiated, then the code that opens the stream should also set the byte stream on this object. Also, if the encoding is auto-detected, then the encoding should also be set on this object.

Parameters
byteStream:InputStream

The new byte stream.

setCharacterStreamback to summary
public void setCharacterStream(Reader charStream)

Sets the character stream. If the character stream is not already opened when this object is instantiated, then the code that opens the stream should also set the character stream on this object. Also, the encoding of the byte stream used by the reader should also be set on this object, if known.

Parameters
charStream:Reader

The new character stream.

See Also
setEncoding
setCreatedByResolverback to summary
public void setCreatedByResolver(boolean createdByResolver)

Sets the flag to indicate whether this source is created by a resolver

Parameters
createdByResolver:boolean

the flag

setEncodingback to summary
public void setEncoding(String encoding)

Sets the encoding of the stream.

Parameters
encoding:String

The new encoding.

setPublicIdback to summary
public void setPublicId(String publicId)

Sets the public identifier.

Parameters
publicId:String

The new public identifier.

setSystemIdback to summary
public void setSystemId(String systemId)

Sets the system identifier.

Parameters
systemId:String

The new system identifier.