org.springframework.xml.transform
Class StringSource
java.lang.Object
javax.xml.transform.stream.StreamSource
org.springframework.xml.transform.StringSource
- All Implemented Interfaces:
- javax.xml.transform.Source
public class StringSource
- extends javax.xml.transform.stream.StreamSource
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
| Fields inherited from class javax.xml.transform.stream.StreamSource |
FEATURE |
|
Constructor Summary |
StringSource(java.lang.String content)
Initializes a new instance of the StringSource with the given string content. |
|
Method Summary |
java.io.InputStream |
getInputStream()
Returns null. |
java.io.Reader |
getReader()
|
void |
setInputStream(java.io.InputStream inputStream)
Throws UnsupportedOperationException. |
void |
setReader(java.io.Reader reader)
Throws UnsupportedOperationException. |
java.lang.String |
toString()
|
| Methods inherited from class javax.xml.transform.stream.StreamSource |
getPublicId, getSystemId, setPublicId, setSystemId, setSystemId |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
StringSource
public StringSource(java.lang.String content)
- Initializes a new instance of the
StringSource with the given string content.
- Parameters:
content - the content
getReader
public java.io.Reader getReader()
- Overrides:
getReader in class javax.xml.transform.stream.StreamSource
setInputStream
public void setInputStream(java.io.InputStream inputStream)
- Throws
UnsupportedOperationException.
- Overrides:
setInputStream in class javax.xml.transform.stream.StreamSource
- Throws:
java.lang.UnsupportedOperationException - always
getInputStream
public java.io.InputStream getInputStream()
- Returns
null.
- Overrides:
getInputStream in class javax.xml.transform.stream.StreamSource
- Returns:
null
setReader
public void setReader(java.io.Reader reader)
- Throws
UnsupportedOperationException.
- Overrides:
setReader in class javax.xml.transform.stream.StreamSource
- Throws:
java.lang.UnsupportedOperationException - always
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2011. All Rights Reserved.