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)

public Stream OpenBinaryStream(
	SPOpenBinaryOptions openOptions,
	string etagNotMatch,
	out string etagNew


Type: Microsoft.SharePoint.SPOpenBinaryOptions

Options to use when opening the file.

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.

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.