OptimizedMemoryStream

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

NameTypeAccessDescription
CanReadboolReadGets the can read.
CanSeekboolReadGets the can seek.
CanWriteboolReadGets the can write.
LengthlongReadGets the length.
PositionlongRead/WriteGets or sets the position.

Methods

SignatureDescription
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[].

See Also

 English