Package org.apache.camel.util.xml
Class StringSource
- java.lang.Object
-
- javax.xml.transform.stream.StreamSource
-
- org.apache.camel.util.xml.StringSource
-
- All Implemented Interfaces:
Externalizable,Serializable,Source
- Direct Known Subclasses:
SourceCache
public class StringSource extends StreamSource implements Externalizable
A helper class which provides a JAXPSourcefrom a String which can be read as many times as required. Encoding is default UTF-8.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class javax.xml.transform.stream.StreamSource
FEATURE
-
-
Constructor Summary
Constructors Constructor Description StringSource()StringSource(String text)StringSource(String text, String systemId)StringSource(String text, String systemId, String encoding)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetEncoding()InputStreamgetInputStream()ReadergetReader()StringgetText()voidreadExternal(ObjectInput in)StringtoString()voidwriteExternal(ObjectOutput out)-
Methods inherited from class javax.xml.transform.stream.StreamSource
getPublicId, getSystemId, isEmpty, setInputStream, setPublicId, setReader, setSystemId, setSystemId
-
-
-
-
Method Detail
-
getInputStream
public InputStream getInputStream()
- Overrides:
getInputStreamin classStreamSource
-
getReader
public Reader getReader()
- Overrides:
getReaderin classStreamSource
-
getText
public String getText()
-
getEncoding
public String getEncoding()
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-