public final class StreamSource extends Source
Represents a stream source.
| Constructor and Description |
|---|
StreamSource()
Initializes a new instance of the
StreamSource class with Null stream. |
StreamSource(byte[] data)
Initializes a new instance of the
StreamSource class. |
StreamSource(ByteBuffer buffer)
Initializes a new instance of the
StreamSource class. |
StreamSource(InputStream stream)
Deprecated.
Will be removed for it is not possible to write image into InputStream, so it is simply wasted. Instead please use
StreamSource(RandomAccessFile) or StreamSource(byte[]) or StreamSource(ByteBuffer)} |
StreamSource(InputStream stream,
boolean disposeStream)
Deprecated.
Will be removed for it is not possible to write image into InputStream, so it is simply wasted. Instead please use
StreamSource(RandomAccessFile,boolean) |
StreamSource(RandomAccessFile file)
Initializes a new instance of the
StreamSource class. |
StreamSource(RandomAccessFile file,
boolean disposeStream)
Initializes a new instance of the
StreamSource class. |
StreamSource(com.aspose.ms.System.IO.Stream stream)
Initializes a new instance of the
StreamSource class. |
StreamSource(com.aspose.ms.System.IO.Stream stream,
boolean disposeStream)
Initializes a new instance of the
StreamSource class. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
getDisposeStream()
Gets a value indicating whether stream should be disposed whenever container gets disposed.
|
com.aspose.ms.System.IO.Stream |
getStream()
Gets the stream.
|
StreamContainer |
getStreamContainer()
Gets the stream container.
|
void |
setStream(com.aspose.ms.System.IO.Stream value)
Sets the stream.
|
public StreamSource(com.aspose.ms.System.IO.Stream stream)
Initializes a new instance of the StreamSource class.
stream - The stream to open.@Deprecated public StreamSource(InputStream stream)
StreamSource(RandomAccessFile) or StreamSource(byte[]) or StreamSource(ByteBuffer)}
Initializes a new instance of the StreamSource class.
stream - The stream to open.public StreamSource(byte[] data)
Initializes a new instance of the StreamSource class.
data - byte array which is stored the imagepublic StreamSource(ByteBuffer buffer)
Initializes a new instance of the StreamSource class.
buffer - ByteBuffer buffer for storing the imagepublic 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.
public StreamSource(RandomAccessFile file)
Initializes a new instance of the StreamSource class.
file - The file to open.public StreamSource(RandomAccessFile file, boolean disposeStream)
Initializes a new instance of the StreamSource class.
file - The file to open.disposeStream - if set to true the stream will be disposed.public StreamSource(com.aspose.ms.System.IO.Stream stream,
boolean disposeStream)
Initializes a new instance of the StreamSource class.
stream - The streamdisposeStream - if set to true the stream will be disposed.@Deprecated public StreamSource(InputStream stream, boolean disposeStream)
StreamSource(RandomAccessFile,boolean)
Initializes a new instance of the StreamSource class.
stream - The stream to open.disposeStream - if set to true the stream will be disposed.public com.aspose.ms.System.IO.Stream getStream()
Gets the stream.
public void setStream(com.aspose.ms.System.IO.Stream value)
Sets the stream.
value - The source stream.public boolean getDisposeStream()
Gets a value indicating whether stream should be disposed whenever container gets disposed.
true if stream should be disposed; otherwise, false.public StreamContainer getStreamContainer()
Gets the stream container.
getStreamContainer in class SourceUse with caution. You will need to dispose the stream container after retrieval.
Copyright (c) 2008-2025 Aspose Pty Ltd. All Rights Reserved.