Share via


SPFileStream.Read method

Reads a block of bytes from the stream and writes the data in a given buffer.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
Public Overrides Function Read ( _
    <OutAttribute> buffer As Byte(), _
    offset As Integer, _
    count As Integer _
) As Integer
'Usage
Dim instance As SPFileStream
Dim buffer As Byte()
Dim offset As Integer
Dim count As Integer
Dim returnValue As Integer

returnValue = instance.Read(buffer, offset, _
    count)
public override int Read(
    byte[] buffer,
    int offset,
    int count
)

Parameters

  • buffer
    Type: []

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

  • offset
    Type: System.Int32

    Byte offset in array at which to begin reading.

  • count
    Type: System.Int32

    The maximum number of bytes to read.

Return value

Type: System.Int32
The total number of bytes read into the buffer. This might be less than the number of bytes requested if that number of bytes is not currently available, or zero if the end of the stream is reached.

See also

Reference

SPFileStream class

SPFileStream members

Microsoft.SharePoint namespace