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() |
getReferencegetEncoding, getPublicId, getSystemId, setEncoding, setPublicId, setSystemIdpublic java.io.Reader constructReader()
throws java.io.IOException
Stax2SourceReader 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 Stax2BlockSourcejava.io.IOExceptionpublic java.io.InputStream constructInputStream()
throws java.io.IOException
Stax2SourceInputStream 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 Stax2BlockSourcejava.io.IOExceptionpublic char[] getBuffer()
public int getBufferStart()
public int getBufferLength()