public class StringSource extends StreamSource
StreamSource
that reads from a StringReader
. The string to be read
can be set via the constructor.FEATURE
Constructor and Description |
---|
StringSource(String content)
Initializes a new instance of the
StringSource with the given string content. |
Modifier and Type | Method and Description |
---|---|
InputStream |
getInputStream()
Returns
null . |
Reader |
getReader() |
void |
setInputStream(InputStream inputStream)
Throws
UnsupportedOperationException . |
void |
setReader(Reader reader)
Throws
UnsupportedOperationException . |
String |
toString() |
getPublicId, getSystemId, setPublicId, setSystemId, setSystemId
public StringSource(String content)
StringSource
with the given string content.content
- the contentpublic Reader getReader()
getReader
in class StreamSource
public void setInputStream(InputStream inputStream)
UnsupportedOperationException
.setInputStream
in class StreamSource
UnsupportedOperationException
- alwayspublic InputStream getInputStream()
null
.getInputStream
in class StreamSource
null
public void setReader(Reader reader)
UnsupportedOperationException
.setReader
in class StreamSource
UnsupportedOperationException
- always