IBufferManager.TakeBuffer Method

Windows Runtime Azure Storage Client Library

Gets a buffer of the specified size or larger from the pool.

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

Usage

Visual Basic
Dim instance As IBufferManager
Dim bufferSize As Integer
Dim returnValue As Byte()

returnValue = instance.TakeBuffer(bufferSize)

Syntax

Visual Basic
Function TakeBuffer ( _
	bufferSize As Integer _
) As Byte()
C#
byte[] TakeBuffer (
	int bufferSize
)
C++
array<unsigned char>^ TakeBuffer (
	int bufferSize
)
J#
byte[] TakeBuffer (
	int bufferSize
)
JScript
function TakeBuffer (
	bufferSize : int
) : byte[]

Parameters

bufferSize

The size, in bytes, of the requested buffer.

Return Value

A byte array that is the requested size of the buffer.

Exceptions

Exception typeCondition
ArgumentOutOfRangeException

The value specified for bufferSize cannot be less than zero.

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