Packages

 

com.aspose.psd.sources

Class StreamSource



  • public final class StreamSource
    extends Source

    Represents a stream source.

    • Constructor Detail

      • StreamSource

        public StreamSource()

        Initializes a new instance of the StreamSource class with Null stream. This constructor allows to create new images without input stream, images stored only in memory.

      • StreamSource

        public StreamSource(InputStream stream)

        Initializes a new instance of the StreamSource class.

        Parameters:
        stream - The stream to open.
      • StreamSource

        public StreamSource(OutputStream destStream,
                            boolean disposeStream)
      • StreamSource

        public StreamSource(com.aspose.ms.System.IO.Stream stream)
      • StreamSource

        public StreamSource(InputStream stream,
                            boolean disposeStream)

        Initializes a new instance of the StreamSource class.

        Parameters:
        stream - The stream to open.
        disposeStream - if set to true the stream will be disposed.
      • StreamSource

        public StreamSource(com.aspose.ms.System.IO.Stream stream,
                            boolean disposeStream)
    • Method Detail

      • getStream

        public final com.aspose.ms.System.IO.Stream getStream()
      • setStream

        public final void setStream(InputStream value)
      • getDisposeStream

        public final boolean getDisposeStream()

        Gets a value indicating whether stream should be disposed whenever container gets disposed.

        Value: true if stream should be disposed; otherwise, false.
      • getStreamContainer

        public StreamContainer getStreamContainer()

        Gets the stream container.

        Specified by:
        getStreamContainer in class Source
        Returns:
        the stream container.


        Use with caution. You will need to dispose the stream container after retrieval.