MultiBufferMemoryStream.Read Method

Windows Runtime Azure Storage Client Library

Reads a block of bytes from the current stream and writes the data to a buffer.

Namespace: Microsoft.WindowsAzure.Storage.Core
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)

Usage

Visual Basic
Dim instance As MultiBufferMemoryStream
Dim buffer As Byte()
Dim offset As Integer
Dim count As Integer
Dim returnValue As Integer

returnValue = instance.Read(buffer, offset, count)

Syntax

Visual Basic
Public Overrides Function Read ( _
	buffer As Byte(), _
	offset As Integer, _
	count As Integer _
) As Integer
C#
public override int Read (
	byte[] buffer,
	int offset,
	int count
)
C++
public:
virtual int Read (
	array<unsigned char>^ buffer, 
	int offset, 
	int count
) override
J#
public int Read (
	byte[] buffer, 
	int offset, 
	int count
)
JScript
public override function Read (
	buffer : byte[], 
	offset : int, 
	count : int
) : int

Parameters

buffer

When this method returns, the buffer contains the specified byte array with the values between offset and (offset + count - 1) replaced by the bytes read from the current source.

offset

The zero-based byte offset in buffer at which to begin storing the data read from the current stream.

count

The maximum number of bytes to be read.

Return Value

The total number of bytes read into the buffer. This can be less than the number of bytes requested if that many bytes are not currently available, or zero if the end of the stream has been reached.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also