StreamExtensions Class

Summary: Provides access to the creation of a MemoryStream or FileStream.

Module: aspose.imaging.extensions

Full Name: aspose.imaging.extensions.StreamExtensions

Constructors

NameDescription
StreamExtensions()Initializes a new instance of the StreamExtensions class

Methods

NameDescription
create_file_stream(path, file_mode)Creates a FileStream.
create_memory_stream()Creates a MemoryStream.
create_memory_stream_from_bytes(array)Creates a MemoryStream with a given array inside.
create_memory_stream_with_size(capacity)Creates a MemoryStream with a given capacity.

Constructor: StreamExtensions()

 StreamExtensions() 

Initializes a new instance of the StreamExtensions class

Method: create_file_stream(path, file_mode) [static]

 create_file_stream(path, file_mode) 

Creates a FileStream.

Parameters:

ParameterTypeDescription
pathstringThe path.
file_modeFileModeThe file mode.

Returns

TypeDescription
_io.BufferedRandomThe FileStream instance.

Method: create_memory_stream() [static]

 create_memory_stream() 

Creates a MemoryStream.

Returns

TypeDescription
_io.BufferedRandomThe MemoryStream instance.

Method: create_memory_stream_from_bytes(array) [static]

 create_memory_stream_from_bytes(array) 

Creates a MemoryStream with a given array inside.

Parameters:

ParameterTypeDescription
arraybyteThe array for wrapping.

Returns

TypeDescription
_io.BufferedRandomThe MemoryStream instance.

Method: create_memory_stream_with_size(capacity) [static]

 create_memory_stream_with_size(capacity) 

Creates a MemoryStream with a given capacity.

Parameters:

ParameterTypeDescription
capacityintThe capacity.

Returns

TypeDescription
_io.BufferedRandomThe MemoryStream instance.