| 
 | Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1 (11.1.1.7) E15033-09 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
   com.bea.wli.sb.sources.StreamSource
com.bea.wli.sb.sources.StreamSource
public class StreamSource
A byte-stream Source whose content comes from an InputStream. As a byte-stream source, the serialization methods do not heed any transformation options. NOTE: since this stream is backed by an InputStream, that means that this source is a single-use source. Both serialization methods pull from the same underlying InputStream, and once that content is consumed, it is gone. The push-based writeTo() method will result in all data being consumed immediately, assuming no error occurs. The pull-based getInputStream() actually gives the underlying InputStream directly to the caller.
| Field Summary | 
|---|
| Fields inherited from interface com.bea.wli.sb.sources.Source | 
|---|
| DEFAULT_CHARACTER_SET_ENCODING | 
| Constructor Summary | |
|---|---|
| StreamSource(java.io.InputStream inputStream) | |
| Method Summary | |
|---|---|
|  java.io.InputStream | getInputStream(TransformOptions options)Returns streaming byte-baseed representation of the Source's content. | 
|  boolean | isConsumed()Indicates if the Source has already been consumed | 
|  int | peek(byte[] b, int off, int len)Peek bytes from the input stream without consuming the input stream. | 
|  void | writeTo(java.io.OutputStream out, TransformOptions options)Serializes the Source's content to a byte-based stream. | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public StreamSource(java.io.InputStream inputStream)
inputStream - A valid InputStream reference to an XML stream.| Method Detail | 
|---|
public java.io.InputStream getInputStream(TransformOptions options)
SourcegetInputStream in interface Sourceoptions - Options used to affect the serialization
public void writeTo(java.io.OutputStream out,
                    TransformOptions options)
             throws java.io.IOException
SourcewriteTo in interface Sourceout - the OutputStream to which serialized content will be writtenoptions - TransformOptions used to affect the serializationjava.io.IOExceptionpublic boolean isConsumed()
SingleUseSourceisConsumed in interface SingleUseSource
public int peek(byte[] b,
                int off,
                int len)
         throws java.io.IOException
readb - bytes array to copy bytes tooff - start offset for bytes to copylen - length of bytes to copyjava.io.IOException - an I/O Exception occurred| 
 | Oracle Fusion Middleware Java API Reference for Oracle Service Bus 11g Release 1 (11.1.1.7) E15033-09 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||