org.codehaus.stax2.io
Class Stax2CharArraySource
java.lang.Object
org.codehaus.stax2.io.Stax2Source
org.codehaus.stax2.io.Stax2BlockSource
org.codehaus.stax2.io.Stax2CharArraySource
- All Implemented Interfaces:
- javax.xml.transform.Source
public class Stax2CharArraySource
- extends Stax2BlockSource
Simple implementation of 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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Stax2CharArraySource
public Stax2CharArraySource(char[] buf,
int start,
int len)
constructReader
public java.io.Reader constructReader()
throws java.io.IOException
- Description copied from class:
Stax2Source
- This method creates a
Reader
via which underlying input
source can be accessed. Note that caller is responsible for
closing that Reader when it is done reading it.
- Specified by:
constructReader
in class Stax2BlockSource
- Throws:
java.io.IOException
constructInputStream
public java.io.InputStream constructInputStream()
throws java.io.IOException
- Description copied from class:
Stax2Source
- This method creates an
InputStream
via which underlying input
source can be accessed. Note that caller is responsible for
closing that InputSource when it is done reading it
- Specified by:
constructInputStream
in class Stax2BlockSource
- Throws:
java.io.IOException
getBuffer
public char[] getBuffer()
getBufferStart
public int getBufferStart()
getBufferLength
public int getBufferLength()