IDataOutput.WriteBytes(String) 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.
Writes a string to the output stream.
[Android.Runtime.Register("writeBytes", "(Ljava/lang/String;)V", "GetWriteBytes_Ljava_lang_String_Handler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public void WriteBytes (string? s);
[<Android.Runtime.Register("writeBytes", "(Ljava/lang/String;)V", "GetWriteBytes_Ljava_lang_String_Handler:Java.IO.IDataOutputInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member WriteBytes : string -> unit
Parameters
- s
- String
the string of bytes to be written.
- Attributes
Exceptions
if an I/O error occurs while writing.
Remarks
Writes a string to the output stream. For every character in the string s
, taken in order, one byte is written to the output stream. If s
is null
, a NullPointerException
is thrown.
If s.length
is zero, then no bytes are written. Otherwise, the character s[0]
is written first, then s[1]
, and so on; the last character written is s[s.length-1]
. For each character, one byte is written, the low-order byte, in exactly the manner of the writeByte
method . The high-order eight bits of each character in the string are ignored.
Java documentation for java.io.DataOutput.writeBytes(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.