Package 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 ofStax2BlockSourcethat encapsulates a simpleString.
-
-
Field Summary
-
Fields inherited from class org.codehaus.stax2.io.Stax2Source
mEncoding, mPublicId, mSystemId
-
-
Constructor Summary
Constructors Constructor Description Stax2StringSource(String text)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStreamconstructInputStream()This method creates anInputStreamvia which underlying input source can be accessed.ReaderconstructReader()This method creates aReadervia which underlying input source can be accessed.StringgetText()-
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
-
-
-
-
Constructor Detail
-
Stax2StringSource
public Stax2StringSource(String text)
-
-
Method Detail
-
constructReader
public Reader constructReader() throws IOException
Description copied from class:Stax2SourceThis method creates aReadervia which underlying input source can be accessed. Note that caller is responsible for closing that Reader when it is done reading it.- Specified by:
constructReaderin classStax2BlockSource- Throws:
IOException
-
constructInputStream
public InputStream constructInputStream() throws IOException
Description copied from class:Stax2SourceThis method creates anInputStreamvia which underlying input source can be accessed. Note that caller is responsible for closing that InputSource when it is done reading it- Specified by:
constructInputStreamin classStax2BlockSource- Throws:
IOException
-
getText
public String getText()
-
-