IBaseStream.OnClose(IRunnable) Method

Definition

Returns an equivalent stream with an additional close handler.

[Android.Runtime.Register("onClose", "(Ljava/lang/Runnable;)Ljava/util/stream/BaseStream;", "GetOnClose_Ljava_lang_Runnable_Handler:Java.Util.Streams.IBaseStreamInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public Java.Lang.Object? OnClose (Java.Lang.IRunnable? closeHandler);
[<Android.Runtime.Register("onClose", "(Ljava/lang/Runnable;)Ljava/util/stream/BaseStream;", "GetOnClose_Ljava_lang_Runnable_Handler:Java.Util.Streams.IBaseStreamInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member OnClose : Java.Lang.IRunnable -> Java.Lang.Object

Parameters

closeHandler
IRunnable

A task to execute when the stream is closed

Returns

Object

a stream with a handler that is run if the stream is closed

Attributes

Remarks

Java documentation for java.util.stream.BaseStream.onClose(java.lang.Runnable).

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