Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-02


oracle.irm.engine.content.source
Class StreamSourceFactory

java.lang.Object
  extended by oracle.irm.engine.content.source.StreamSourceFactory


public final class StreamSourceFactory
extends Object

Stream Source factory. This class provides methods for creating new instances of StreamSource objects.


Method Summary
static StreamSource createStreamSource(InputStream inputStream, int size, String mimeType)
          Create a stream source.
static StreamSource createStreamSource(InputStream stream, String mimeType)
          Create a stream source.

 

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

 

Method Detail

createStreamSource

public static StreamSource createStreamSource(InputStream stream,
                                              String mimeType)
                                       throws UnsupportedContentTypeException
Create a stream source. This constructor should be used if the total size of data on the stream is not known. For content types that are editable (resealable) it is better to use the alternative constructor that allows the total size to be specified.
Parameters:
stream - the data stream.
mimeType - the unsealed or sealed MIME type of the data provided in the stream. The stream is assumed to contain unsealed data.
Returns:
a new Stream Source instance.
Throws:
UnsupportedContentTypeException - unsupported MIME type.

createStreamSource

public static StreamSource createStreamSource(InputStream inputStream,
                                              int size,
                                              String mimeType)
                                       throws UnsupportedContentTypeException
Create a stream source. This constructor should be used if the total size of data on the stream is known.
Parameters:
inputStream - the data stream.
size - the total size of the data on the stream.
mimeType - the sealed or unsealed MIME type for the stream contents.
Returns:
a new Stream Source instance.
Throws:
UnsupportedContentTypeException - unsupported MIME type.

Skip navigation links

Oracle® Information Rights Management Server Java API Reference
11g Release 1 (11.1.1)

E12907-02


Copyright © 2010, Oracle. All rights reserved.