Share via


SPFile.OpenBinaryStream method (SPOpenBinaryOptions, String, String)

Opens the file as a stream based on the specified options.

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

Syntax

'Declaration
Public Function OpenBinaryStream ( _
    openOptions As SPOpenBinaryOptions, _
    etagNotMatch As String, _
    <OutAttribute> ByRef etagNew As String _
) As Stream
'Usage
Dim instance As SPFile
Dim openOptions As SPOpenBinaryOptions
Dim etagNotMatch As String
Dim etagNew As String
Dim returnValue As Stream

returnValue = instance.OpenBinaryStream(openOptions, _
    etagNotMatch, etagNew)
public Stream OpenBinaryStream(
    SPOpenBinaryOptions openOptions,
    string etagNotMatch,
    out string etagNew
)

Parameters

  • etagNotMatch
    Type: System.String

    The ETag value to use for not match. If a null reference (Nothing in Visual Basic), the file is always opened. If not a null reference (Nothing in Visual Basic) and the match operation fails, an exception is thrown.

  • etagNew
    Type: System.String

    When this method returns, contains a String that is the ETag value of the newly opened file. This parameter is passed uninitialized.

Return value

Type: System.IO.Stream
An System.IO.Stream object that represents the file.

See also

Reference

SPFile class

SPFile members

OpenBinaryStream overload

Microsoft.SharePoint namespace