org.codehaus.stax2.io
public abstract class Stax2BlockSource extends Stax2Source
Stax2Source
s
that an be used to access fixed-length in-memory data sources, such
as byte and char arrays, Strings, StringBuffers and so forth.
The main reason for using such a source object (instead of constructing
wrapper Readers or InputStreams) is that concrete implementations
usually also allow more direct access to the underlying data, so
that stream reader implementations may be able to do more optimal
access.mEncoding, mPublicId, mSystemId
Modifier | Constructor and Description |
---|---|
protected |
Stax2BlockSource() |
Modifier and Type | Method and Description |
---|---|
abstract java.io.InputStream |
constructInputStream()
This method creates an
InputStream via which underlying input
source can be accessed. |
abstract java.io.Reader |
constructReader()
This method creates a
Reader via which underlying input
source can be accessed. |
java.net.URL |
getReference()
Usually there is no way to refer to the underlying data source,
since they are in-memory data structures.
|
getEncoding, getPublicId, getSystemId, setEncoding, setPublicId, setSystemId
public java.net.URL getReference()
getReference
in class Stax2Source
public abstract java.io.Reader constructReader() throws java.io.IOException
Stax2Source
Reader
via which underlying input
source can be accessed. Note that caller is responsible for
closing that Reader when it is done reading it.constructReader
in class Stax2Source
java.io.IOException
public abstract java.io.InputStream constructInputStream() throws java.io.IOException
Stax2Source
InputStream
via which underlying input
source can be accessed. Note that caller is responsible for
closing that InputSource when it is done reading itconstructInputStream
in class Stax2Source
java.io.IOException