Channels.NewOutputStream Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
NewOutputStream(IAsynchronousByteChannel) |
Constructs a stream that writes bytes to the given channel. |
NewOutputStream(IWritableByteChannel) |
Constructs a stream that writes bytes to the given channel. |
NewOutputStream(IAsynchronousByteChannel)
Constructs a stream that writes bytes to the given channel.
[Android.Runtime.Register("newOutputStream", "(Ljava/nio/channels/AsynchronousByteChannel;)Ljava/io/OutputStream;", "", ApiSince=26)]
public static System.IO.Stream? NewOutputStream (Java.Nio.Channels.IAsynchronousByteChannel? ch);
[<Android.Runtime.Register("newOutputStream", "(Ljava/nio/channels/AsynchronousByteChannel;)Ljava/io/OutputStream;", "", ApiSince=26)>]
static member NewOutputStream : Java.Nio.Channels.IAsynchronousByteChannel -> System.IO.Stream
Parameters
The channel to which bytes will be written
Returns
A new output stream
- Attributes
Remarks
Constructs a stream that writes bytes to the given channel.
The stream will not be buffered. The stream will be safe for access by multiple concurrent threads. Closing the stream will in turn cause the channel to be closed.
Added in 1.7.
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
NewOutputStream(IWritableByteChannel)
Constructs a stream that writes bytes to the given channel.
[Android.Runtime.Register("newOutputStream", "(Ljava/nio/channels/WritableByteChannel;)Ljava/io/OutputStream;", "")]
public static System.IO.Stream? NewOutputStream (Java.Nio.Channels.IWritableByteChannel? ch);
[<Android.Runtime.Register("newOutputStream", "(Ljava/nio/channels/WritableByteChannel;)Ljava/io/OutputStream;", "")>]
static member NewOutputStream : Java.Nio.Channels.IWritableByteChannel -> System.IO.Stream
Parameters
The channel to which bytes will be written
Returns
A new output stream
- Attributes
Remarks
Constructs a stream that writes bytes to the given channel.
The write
methods of the resulting stream will throw an IllegalBlockingModeException
if invoked while the underlying channel is in non-blocking mode. The stream will not be buffered. The stream will be safe for access by multiple concurrent threads. Closing the stream will in turn cause the channel to be closed.
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.