Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
GetStream Method

PackagePart.GetStream Method

Returns the part content data stream.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

  Name Description
Public method GetStream() Returns the part content data stream.
Public method GetStream(FileMode) Returns the content stream opened in a specified I/O FileMode.
Public method GetStream(FileMode, FileAccess) Returns the part content stream opened with a specified FileMode and FileAccess.

Notes to Callers

GetStream internally calls the derived GetStreamCore method to actually 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.

© 2015 Microsoft