org.codehaus.stax2.io
Class Stax2StringSource

java.lang.Object
  extended by org.codehaus.stax2.io.Stax2Source
      extended by org.codehaus.stax2.io.Stax2BlockSource
          extended by org.codehaus.stax2.io.Stax2StringSource
All Implemented Interfaces:
javax.xml.transform.Source

public class Stax2StringSource
extends Stax2BlockSource

Simple implementation of Stax2BlockSource that encapsulates a simple String.


Field Summary
 
Fields inherited from class org.codehaus.stax2.io.Stax2Source
mEncoding, mPublicId, mSystemId
 
Constructor Summary
Stax2StringSource(java.lang.String text)
           
 
Method Summary
 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.
 java.lang.String getText()
           
 
Methods inherited from class org.codehaus.stax2.io.Stax2BlockSource
getReference
 
Methods inherited from class org.codehaus.stax2.io.Stax2Source
getEncoding, getPublicId, getSystemId, setEncoding, setPublicId, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Stax2StringSource

public Stax2StringSource(java.lang.String text)
Method Detail

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

getText

public java.lang.String getText()