Freigeben über


ICloseable.Close Method

Definition

Closes this stream and releases any system resources associated with it.

[Android.Runtime.Register("close", "()V", "GetCloseHandler:Java.IO.ICloseableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void Close ();
[<Android.Runtime.Register("close", "()V", "GetCloseHandler:Java.IO.ICloseableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Close : unit -> unit
Attributes

Exceptions

Remarks

Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.

As noted in AutoCloseable#close(), cases where the close may fail require careful attention. It is strongly advised to relinquish the underlying resources and to internally <em>mark</em> the Closeable as closed, prior to throwing the IOException.

Java documentation for java.io.Closeable.close().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to