org.apache.camel.converter.jaxp
Class StringSource

java.lang.Object
  extended by javax.xml.transform.stream.StreamSource
      extended by org.apache.camel.converter.jaxp.StringSource
All Implemented Interfaces:
Externalizable, Serializable, Source
Direct Known Subclasses:
SourceCache

public class StringSource
extends StreamSource
implements Externalizable

A helper class which provides a JAXP Source from a String which can be read as many times as required. Encoding is default UTF-8.

Version:
$Revision: 740298 $
See Also:
Serialized Form

Field Summary
 
Fields inherited from class javax.xml.transform.stream.StreamSource
FEATURE
 
Constructor Summary
StringSource()
           
StringSource(String text)
           
StringSource(String text, String systemId)
           
StringSource(String text, String systemId, String encoding)
           
 
Method Summary
 String getEncoding()
           
 InputStream getInputStream()
           
 Reader getReader()
           
 String getText()
           
 void readExternal(ObjectInput in)
           
 String toString()
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class javax.xml.transform.stream.StreamSource
getPublicId, getSystemId, setInputStream, setPublicId, setReader, setSystemId, setSystemId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StringSource

public StringSource()

StringSource

public StringSource(String text)

StringSource

public StringSource(String text,
                    String systemId)

StringSource

public StringSource(String text,
                    String systemId,
                    String encoding)
Method Detail

getInputStream

public InputStream getInputStream()
Overrides:
getInputStream in class StreamSource

getReader

public Reader getReader()
Overrides:
getReader in class StreamSource

toString

public String toString()
Overrides:
toString in class Object

getText

public String getText()

getEncoding

public String getEncoding()

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException


Apache CAMEL