Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream.
[Visual Basic] MustOverride Public Sub Close() [C#] public abstract void Close(); [C++] public: virtual void Close() = 0; [JScript] public abstract function Close();
Exception Type | Condition |
---|---|
IOException | An I/O error occurs. |
Following a call to Close, other operations on the stream might raise exceptions. However, you may safely call Close on a closed stream.
This default implementation does nothing. Stream subclasses must override this method to provide the appropriate functionality.