StreamUtils.CopyToMemoryStream Method

Namespace:
Weavy.Core.Imaging
Assembly:
Weavy.Core.dll

CopyToMemoryStream(Stream, bool, int)

Copies the current stream into a new MemoryStream instance.

public static MemoryStream CopyToMemoryStream(Stream s, bool entireStream, int chunkSize)

Parameters

s
System.IO.Stream
entireStream
bool

True to copy entire stream if seeakable, false to only copy remaining data

chunkSize
int

The buffer size to use (in bytes) if a buffer is required. Default: 4KiB

Returns

System.IO.MemoryStream