org.codehaus.stax2.io
Class Stax2StringSource
java.lang.Object
org.codehaus.stax2.io.Stax2Source
org.codehaus.stax2.io.Stax2BlockSource
org.codehaus.stax2.io.Stax2StringSource
- All Implemented Interfaces:
- Source
public class Stax2StringSource
- extends Stax2BlockSource
Simple implementation of Stax2BlockSource
that encapsulates
a simple String
.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Stax2StringSource
public Stax2StringSource(String text)
constructReader
public Reader constructReader()
throws 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:
IOException
constructInputStream
public InputStream constructInputStream()
throws 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:
IOException
getText
public String getText()