net.sf.xbus.protocol.simple
Class Text2StreamTransformer

java.lang.Object
  extended by net.sf.xbus.protocol.simple.Text2StreamTransformer
All Implemented Interfaces:
Transformer

public class Text2StreamTransformer
extends java.lang.Object
implements Transformer

The Text2StreamTransformer returns a ByteArrayInputStream to read a string content. The class StringBufferInputStream is deprecated: "This class does not properly convert characters into bytes. As of JDK 1.1, the preferred way to create a stream from a string is via the StringReader class."


Constructor Summary
Text2StreamTransformer()
           
 
Method Summary
 java.lang.Object transform(java.lang.Object inObject, XBUSSystem source, XBUSSystem destination, Message destinationMessage)
          The Text2StreamTransformer returns a ByteArrayInputStream to read a string content.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Text2StreamTransformer

public Text2StreamTransformer()
Method Detail

transform

public java.lang.Object transform(java.lang.Object inObject,
                                  XBUSSystem source,
                                  XBUSSystem destination,
                                  Message destinationMessage)
                           throws XException
The Text2StreamTransformer returns a ByteArrayInputStream to read a string content.

Specified by:
transform in interface Transformer
Parameters:
inObject - either the request or response of the source message
source - not used
destination - not used
destinationMessage - not used
Returns:
ByteArrayInputStream
Throws:
XException