public class StreamContainer extends Object
| Constructor and Description |
|---|
StreamContainer()
Initializes a new instance of the
StreamContainer class. |
StreamContainer(InputStream stream,
boolean disposeStream) |
StreamContainer(com.aspose.ms.System.IO.Stream stream,
boolean disposeStream)
Initializes a new instance of the
StreamContainer class. |
| Modifier and Type | Method and Description |
|---|---|
static void |
copyStream(com.aspose.ms.System.IO.Stream source,
com.aspose.ms.System.IO.Stream destination)
Copies stream data from source to destination.
|
void |
dispose()
Disposes the current instance.
|
protected void |
dispose(boolean disposing) |
byte[] |
getBytes() |
static byte[] |
getBytes(InputStream stream) |
static byte[] |
getBytes(com.aspose.ms.System.IO.Stream stream) |
boolean |
getDisposed()
Gets a value indicating whether this instance is disposed.
|
String |
getHash()
Gets the hash value for the underlying stream.
|
InputStream |
getInputStream() |
long |
getLength()
Gets the underlying stream length in bytes.
|
OutputStream |
getOutputStream() |
static com.aspose.ms.System.IO.Stream |
getStreamCopy(InputStream source) |
static com.aspose.ms.System.IO.Stream |
getStreamCopy(com.aspose.ms.System.IO.Stream source) |
com.aspose.ms.System.IO.Stream |
getUnderlyingStream()
Gets the underlying stream.
|
void |
seekBegin()
Sets the underlying stream position to the beginning of the stream.
|
void |
setLength(long value)
Sets the underlying stream length in bytes.
|
public StreamContainer()
Initializes a new instance of the StreamContainer class.
public StreamContainer(InputStream stream, boolean disposeStream)
public StreamContainer(com.aspose.ms.System.IO.Stream stream,
boolean disposeStream)
Initializes a new instance of the StreamContainer class.
stream - The data stream.disposeStream - If set to true the stream will be disposed when container is disposed.public static void copyStream(com.aspose.ms.System.IO.Stream source,
com.aspose.ms.System.IO.Stream destination)
Copies stream data from source to destination.
source - The source stream.destination - The destination streampublic final void dispose()
Disposes the current instance.
protected void dispose(boolean disposing)
public final byte[] getBytes()
public static byte[] getBytes(InputStream stream)
public static byte[] getBytes(com.aspose.ms.System.IO.Stream stream)
public final boolean getDisposed()
Gets a value indicating whether this instance is disposed.
public final String getHash()
Gets the hash value for the underlying stream.
public final InputStream getInputStream()
public final long getLength()
Gets the underlying stream length in bytes.
This value is less than the System.IO.Stream.Length by the starting underlying stream position
passed in the StreamContainer constructor.
public final OutputStream getOutputStream()
public static com.aspose.ms.System.IO.Stream getStreamCopy(InputStream source)
public static com.aspose.ms.System.IO.Stream getStreamCopy(com.aspose.ms.System.IO.Stream source)
public final com.aspose.ms.System.IO.Stream getUnderlyingStream()
Gets the underlying stream.
public final void seekBegin()
Sets the underlying stream position to the beginning of the stream.
This value represents offset from the starting stream position passed in the StreamContainer
constructor.
public final void setLength(long value)
Sets the underlying stream length in bytes.
This value is less than the System.IO.Stream.Length by the starting underlying stream position
passed in the StreamContainer constructor.
value - The stream length.Copyright © 2026. All rights reserved.