public class Stax2CharArraySource extends Stax2BlockSource
Stax2BlockSource
that encapsulates
an char array.
Note that no copy is made of the passed-in array, and that further there are direct access methods. Thus, although callers are not to modify contents of returned array, this can not be guaranteed; and as such if this would be a problem (security problem for example), caller has to make a copy of the array and pass that copy to the constructor.
Modifier and Type | Field and Description |
---|---|
(package private) char[] |
mBuffer |
(package private) int |
mLength |
(package private) int |
mStart |
mEncoding, mPublicId, mSystemId
Constructor and Description |
---|
Stax2CharArraySource(char[] buf,
int start,
int len) |
Modifier and Type | Method and Description |
---|---|
java.io.InputStream |
constructInputStream()
This method creates an
InputStream via which underlying input
source can be accessed. |
java.io.Reader |
constructReader()
This method creates a
Reader via which underlying input
source can be accessed. |
char[] |
getBuffer() |
int |
getBufferLength() |
int |
getBufferStart() |
getReference
getEncoding, getPublicId, getSystemId, setEncoding, setPublicId, setSystemId
public 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 Stax2BlockSource
java.io.IOException
public 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 Stax2BlockSource
java.io.IOException
public char[] getBuffer()
public int getBufferStart()
public int getBufferLength()