Class StringSource
java.lang.Object
javax.xml.transform.stream.StreamSource
org.springframework.xml.transform.StringSource
- All Implemented Interfaces:
Source
Convenient subclass of
StreamSource
that reads from a StringReader
. The string to be read can be set
via the constructor.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
-
Field Summary
Fields inherited from class javax.xml.transform.stream.StreamSource
FEATURE
-
Constructor Summary
ConstructorDescriptionStringSource
(String content) Initializes a new instance of theStringSource
with the given string content. -
Method Summary
Modifier and TypeMethodDescriptionReturnsnull
.void
setInputStream
(InputStream inputStream) ThrowsUnsupportedOperationException
.void
ThrowsUnsupportedOperationException
.toString()
Methods inherited from class javax.xml.transform.stream.StreamSource
getPublicId, getSystemId, isEmpty, setPublicId, setSystemId, setSystemId
-
Constructor Details
-
StringSource
Initializes a new instance of theStringSource
with the given string content.- Parameters:
content
- the content
-
-
Method Details
-
getReader
- Overrides:
getReader
in classStreamSource
-
setInputStream
ThrowsUnsupportedOperationException
.- Overrides:
setInputStream
in classStreamSource
- Throws:
UnsupportedOperationException
- always
-
getInputStream
Returnsnull
.- Overrides:
getInputStream
in classStreamSource
- Returns:
null
-
setReader
ThrowsUnsupportedOperationException
.- Overrides:
setReader
in classStreamSource
- Throws:
UnsupportedOperationException
- always
-
toString
-