PackagePart.GetStreamCore Method

When overridden in a derived class, returns the part content stream opened with a specified FileMode and FileAccess.

Namespace:  System.IO.Packaging
Assembly:  WindowsBase (in WindowsBase.dll)

protected abstract Stream GetStreamCore(
	FileMode mode,
	FileAccess access


Type: System.IO.FileMode

The I/O mode in which to open the content stream.

Type: System.IO.FileAccess

The access permissions to use in opening the content stream.

Return Value

Type: System.IO.Stream
The content data stream of the part.

Applications should not call GetStreamCore directly, but instead should call GetStream.

Notes to Implementers

The derived GetStreamCore implementation should make no assumptions about the order or operations performed by the GetStream method that calls it.

Notes to Callers

The derived GetStreamCore method is called by the GetStream methods to open and return the part data stream based on the physical format implemented in the derived class.

By default, the ZipPackagePart subclass implementation of the abstract PackagePart class is provided and used. In the default operation, GetStream internally calls GetStreamCore of the ZipPackagePart class to open and return the part data stream from a ZIP file.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft