OptimizedMemoryStream
Overview
OptimizedMemoryStream is a class in Aspose.PDF FOSS for .NET.
Inherits from: Stream.
A growable in-memory stream that can exceed the 2 GB single-array limit of MemoryStream by storing data in fixed-size chunks.
This class provides 9 methods for working with OptimizedMemoryStream objects in .NET programs.
Available methods include: Flush, OptimizedMemoryStream, Read, Seek, SetLength, ToArray, Write, WriteByte.
All public members are accessible to any .NET application after installing the Aspose.PDF FOSS for .NET package.
Properties: CanRead, CanSeek, CanWrite, Length, Position.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
CanRead | bool | Read | Gets the can read. |
CanSeek | bool | Read | Gets the can seek. |
CanWrite | bool | Read | Gets the can write. |
Length | long | Read | Gets the length. |
Position | long | Read/Write | Gets or sets the position. |
Methods
| Signature | Description |
|---|---|
OptimizedMemoryStream() | Calls OptimizedMemoryStream on this OptimizedMemoryStream instance. |
OptimizedMemoryStream(buffer: byte[]) | Calls OptimizedMemoryStream(buffer) on this OptimizedMemoryStream instance. |
Flush() | Calls Flush on this OptimizedMemoryStream instance. |
Write(buffer: byte[], offset: int, count: int) | Calls Write(buffer, offset, count) on this OptimizedMemoryStream instance. |
WriteByte(value: byte) | Calls WriteByte(value) on this OptimizedMemoryStream instance. |
Read(buffer: byte[], offset: int, count: int) | Calls Read(buffer, offset, count) on this OptimizedMemoryStream instance. |
Seek(offset: long, origin: SeekOrigin) | Calls Seek(offset, origin) on this OptimizedMemoryStream instance. |
SetLength(value: long) | Sets the length value. |
ToArray() | Copy the entire contents to a single byte[]. |