Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
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.
Write(Byte[]) |
Writes |
Write(Int32) |
Writes the specified byte to this output stream. |
Write(Byte[], Int32, Int32) |
Writes |
Writes b.length
bytes from the specified byte array
to this output stream.
[Android.Runtime.Register("write", "([B)V", "GetWrite_arrayBHandler")]
public virtual void Write(byte[]? b);
[<Android.Runtime.Register("write", "([B)V", "GetWrite_arrayBHandler")>]
abstract member Write : byte[] -> unit
override this.Write : byte[] -> unit
the data.
Writes b.length
bytes from the specified byte array to this output stream. The general contract for write(b)
is that it should have exactly the same effect as the call write(b, 0, b.length)
.
Java documentation for java.io.OutputStream.write(byte[])
.
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.
Writes the specified byte to this output stream.
[Android.Runtime.Register("write", "(I)V", "GetWrite_IHandler")]
public abstract void Write(int b);
[<Android.Runtime.Register("write", "(I)V", "GetWrite_IHandler")>]
abstract member Write : int -> unit
the byte
.
if an error occurs while writing to this stream.
Writes the specified byte to this output stream. The general contract for write
is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b
. The 24 high-order bits of b
are ignored.
Subclasses of OutputStream
must provide an implementation for this method.
Java documentation for java.io.OutputStream.write(int)
.
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.
Writes len
bytes from the specified byte array
starting at offset off
to this output stream.
[Android.Runtime.Register("write", "([BII)V", "GetWrite_arrayBIIHandler")]
public virtual void Write(byte[]? b, int off, int len);
[<Android.Runtime.Register("write", "([BII)V", "GetWrite_arrayBIIHandler")>]
abstract member Write : byte[] * int * int -> unit
override this.Write : byte[] * int * int -> unit
the data.
the start offset in the data.
the number of bytes to write.
if an error occurs while writing to this stream.
if offset
or count
, or if
offset + count
is bigger than the length of
buffer
.
Writes len
bytes from the specified byte array starting at offset off
to this output stream. The general contract for write(b, off, len)
is that some of the bytes in the array b
are written to the output stream in order; element b[off]
is the first byte written and b[off+len-1]
is the last byte written by this operation.
The write
method of OutputStream
calls the write method of one argument on each of the bytes to be written out. Subclasses are encouraged to override this method and provide a more efficient implementation.
If b
is null
, a NullPointerException
is thrown.
If off
is negative, or len
is negative, or off+len
is greater than the length of the array b
, then an IndexOutOfBoundsException
is thrown.
Java documentation for java.io.OutputStream.write(byte[], int, int)
.
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.
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in