javax.xml.transform.Source ) that Stax2
org.codehaus.stax2.XMLInputFactory2 implementations should support.
Note about usage by the parser factory implementations: the expectation
is that at least one of methods constructReader and
constructInputStream will succeed, but not necessarily both.
This generally depends on type of resource being represented: for example,
if the source is a String or character array, it is most naturally
represent via Reader. For a byte array, on the other hand,
an InputStream is the most natural access method.
Other things to note about using result Readers and
InputStreams:
Reader and
InputStream instances requested. That is, caller owns
these accessor objects.
| Modifier and Type | Field and Description |
|---|---|
| protected String | |
| protected String | |
| protected String |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public abstract InputStream | constructInputStream()
This method creates an |
| public abstract Reader | |
| public String | |
| public String | |
| public abstract URL | Returns: 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)
|
| public String | getSystemId()
Implements javax. |
| public void | |
| public void | |
| public void | setSystemId(String
The system identifier as a URL string. id)Implements javax. |
| mEncoding | back to summary |
|---|---|
| protected String mEncoding | |
| mPublicId | back to summary |
|---|---|
| protected String mPublicId | |
| mSystemId | back to summary |
|---|---|
| protected String mSystemId | |
| Stax2Source | back to summary |
|---|---|
| protected Stax2Source() | |
| constructInputStream | back to summary |
|---|---|
| public abstract InputStream constructInputStream() throws IOException This method creates an | |
| constructReader | back to summary |
|---|---|
| public abstract Reader constructReader() throws IOException This method creates a | |
| getEncoding | back to summary |
|---|---|
| public String getEncoding() | |
| getPublicId | back to summary |
|---|---|
| public String getPublicId() | |
| getReference | back to summary |
|---|---|
public abstract URL getReference()
| |
| getSystemId | back to summary |
|---|---|
| public String getSystemId() Implements javax. Doc from javax. Get the system identifier that was set with setSystemId. | |
| setEncoding | back to summary |
|---|---|
| public void setEncoding(String enc) | |
| setPublicId | back to summary |
|---|---|
| public void setPublicId(String id) | |
| setSystemId | back to summary |
|---|---|
| public void setSystemId(String id) Implements javax. Doc from javax. Set the system identifier for this Source. The system identifier is optional if the source does not get its data from a URL, but it may still be useful to provide one. The application can use a system identifier, for example, to resolve relative URIs and to include in error messages and warnings. | |