Condividi tramite


ObjectOutputStream.WriteUTF(String) Method

Definition

Primitive data write of this String in modified UTF-8 format.

[Android.Runtime.Register("writeUTF", "(Ljava/lang/String;)V", "GetWriteUTF_Ljava_lang_String_Handler")]
public virtual void WriteUTF (string? str);
[<Android.Runtime.Register("writeUTF", "(Ljava/lang/String;)V", "GetWriteUTF_Ljava_lang_String_Handler")>]
abstract member WriteUTF : string -> unit
override this.WriteUTF : string -> unit

Parameters

str
String

the String to be written

Implements

Attributes

Exceptions

if an error occurs while writing to the target stream.

Remarks

Primitive data write of this String in modified UTF-8 format. Note that there is a significant difference between writing a String into the stream as primitive data or as an Object. A String instance written by writeObject is written into the stream as a String initially. Future writeObject() calls write references to the string into the stream.

Java documentation for java.io.ObjectOutputStream.writeUTF(java.lang.String).

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