Share via


EncoderStream.Read Method

The Read method encodes or decodes data as it reads from the Stream object that this EncoderStream object owns.

Namespace: Microsoft.Exchange.Data.Mime.Encoders
Assembly: Microsoft.Exchange.Data.Common (in microsoft.exchange.data.common.dll)

Syntax

'Declaration
Public Overrides NotOverridable Function Read ( _
    array As Byte(), _
    offset As Integer, _
    count As Integer _
) As Integer
public override sealed int Read (
    byte[] array,
    int offset,
    int count
)
public:
virtual int Read (
    array<unsigned char>^ array, 
    int offset, 
    int count
) override sealed
public final int Read (
    byte[] array, 
    int offset, 
    int count
)
public override final function Read (
    array : byte[], 
    offset : int, 
    count : int
) : int

Parameters

  • array
    A byte array that will contain the read data.
  • offset
    An integer indicating where in array to place the data.
  • count
    An integer indicating the number of bytes to attempt to read.

Return Value

The Read method returns the total number of bytes read into the array.

Exceptions

Exception type Condition
ArgumentNullException

array was null.

NotSupportedException

The Stream that this EncoderStream object owns does not support reading.

ArgumentOutOfRangeException

The sum of offset and count is greater than the array length.

ArgumentOutOfRangeException

The sum of offset and count is 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 XP Professional with Service Pack 2 (SP2), Windows Server 2003,

Target Platforms

Windows Server 2003