Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.4.0)

E15033-02


com.bea.wli.sb.sources
Class StringSource

java.lang.Object
  extended by com.bea.wli.sb.sources.StringSource

All Implemented Interfaces:
Source

public class StringSource
extends java.lang.Object
implements Source

A Source that is backed by a single String. Serialization is simply a character-set encoded version of the character data.


Field Summary

 

Fields inherited from interface com.bea.wli.sb.sources.Source
DEFAULT_CHARACTER_SET_ENCODING

 

Constructor Summary
StringSource(java.lang.String str)
           

 

Method Summary
 java.io.InputStream getInputStream(TransformOptions options)
          Returns streaming byte-baseed representation of the Source's content.
static StringSource getInstance(java.io.InputStream in, TransformOptions options)
           
 java.lang.String getString()
           
 java.lang.String toString()
           
 void writeTo(java.io.OutputStream os, TransformOptions options)
          Serializes the Source's content to a byte-based stream.

 

Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

 

Constructor Detail

StringSource

public StringSource(java.lang.String str)

Method Detail

getString

public java.lang.String getString()

getInputStream

public java.io.InputStream getInputStream(TransformOptions options)
                                   throws java.io.IOException,
                                          TransformException
Description copied from interface: Source
Returns streaming byte-baseed representation of the Source's content. The representation of that serialization is entirely up to the Source. Note that this method may involve an internal transformation, although it should not in any way change the underlying content.
Specified by:
getInputStream in interface Source
Parameters:
options - Options used to affect the serialization
Returns:
an InputStream for retrieving the serialized content
Throws:
java.io.IOException
TransformException

writeTo

public void writeTo(java.io.OutputStream os,
                    TransformOptions options)
             throws java.io.IOException,
                    TransformException
Description copied from interface: Source
Serializes the Source's content to a byte-based stream. The representation of that serialization is entirely up to the Source. The Source is forbidden from closing the provided OutputStream, although it is allowed to flush it. However, flushing the stream should be left to the caller, if possible. <p/> Note that this method may involve an internal transformation, although it should not in any way change the underlying content.
Specified by:
writeTo in interface Source
Parameters:
os - the OutputStream to which serialized content will be written
options - TransformOptions used to affect the serialization
Throws:
java.io.IOException
TransformException

getInstance

public static StringSource getInstance(java.io.InputStream in,
                                       TransformOptions options)
                                throws java.io.IOException
Throws:
java.io.IOException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Service Bus
11g Release 1 (11.1.1.4.0)

E15033-02


Copyright © 2008, 2010, Oracle. All rights reserved.