다음을 통해 공유


Socket.OutputStream Property

Definition

Returns an output stream for this socket.

public virtual System.IO.Stream? OutputStream { [Android.Runtime.Register("getOutputStream", "()Ljava/io/OutputStream;", "GetGetOutputStreamHandler")] get; }
[<get: Android.Runtime.Register("getOutputStream", "()Ljava/io/OutputStream;", "GetGetOutputStreamHandler")>]
member this.OutputStream : System.IO.Stream

Property Value

an output stream for writing bytes to this socket.

Attributes

Exceptions

if an error occurs while creating the output stream or the socket is in an invalid state.

Remarks

Returns an output stream for this socket.

If this socket has an associated channel then the resulting output stream delegates all of its operations to the channel. If the channel is in non-blocking mode then the output stream's write operations will throw an java.nio.channels.IllegalBlockingModeException.

Closing the returned java.io.OutputStream OutputStream will close the associated socket.

Java documentation for java.net.Socket.getOutputStream().

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