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
ConstructorsConstructorDescriptionStringSource(String content) Initializes a new instance of theStringSourcewith the given string content. -
Method Summary
Modifier and TypeMethodDescriptionReturnsnull.voidsetInputStream(InputStream inputStream) ThrowsUnsupportedOperationException.voidThrowsUnsupportedOperationException.toString()Methods inherited from class javax.xml.transform.stream.StreamSource
getPublicId, getSystemId, isEmpty, setPublicId, setSystemId, setSystemId
-
Constructor Details
-
StringSource
Initializes a new instance of theStringSourcewith the given string content.- Parameters:
content- the content
-
-
Method Details
-
getReader
- Overrides:
getReaderin classStreamSource
-
setInputStream
ThrowsUnsupportedOperationException.- Overrides:
setInputStreamin classStreamSource- Throws:
UnsupportedOperationException- always
-
getInputStream
Returnsnull.- Overrides:
getInputStreamin classStreamSource- Returns:
null
-
setReader
ThrowsUnsupportedOperationException.- Overrides:
setReaderin classStreamSource- Throws:
UnsupportedOperationException- always
-
toString
-