NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

BufferedStream.Close

Closes the stream and releases any resources (especially system resources such as sockets and file handles) associated with the current buffered stream.

[Visual Basic]
Overrides Public Sub Close()
[C#]
public override void Close();
[C++]
public: override void Close();
[JScript]
public override function Close();

Remarks

Any data previously written to the buffer is copied to the underlying data source or repository before the buffered stream is closed. Therefore, it is not necessary to call Flush before invoking Close. Following a call to Close, any operations on the buffered stream may raise exceptions.

Subclasses of BufferedStream must override this method so that any system resources, such as file handles, are released. The implementation should invoke BufferedStream.Close to ensure that previously written buffer data is safely copied to the underlying data source or repository.

See Also

BufferedStream Class | BufferedStream Members | System.IO Namespace | Flush