Java.IO.OutputStream Class
A writable sink for bytes.

See Also: OutputStream Members

Syntax

[Android.Runtime.Register("java/io/OutputStream", DoNotGenerateAcw=true)]
public abstract class OutputStream : Java.Lang.Object, ICloseable, IFlushable, IDisposable

Remarks

A writable sink for bytes.

Most clients will use output streams that write data to the file system (Java.IO.FileOutputStream), the network (Java.Net.Socket.OutputStream/Java.Net.URLConnection.OutputStream), or to an in-memory byte array (Java.IO.ByteArrayOutputStream).

Use Java.IO.OutputStreamWriter to adapt a byte stream like this one into a character stream.

Most clients should wrap their output stream with Java.IO.BufferedOutputStream. Callers that do only bulk writes may omit buffering.

Subclassing OutputStream

Subclasses that decorate another output stream should consider subclassing Java.IO.FilterOutputStream, which delegates all calls to the target output stream.

All output stream subclasses should override bothOutputStream.Write(int) and OutputStream.Write(Byte[], System.Int32, System.Int32). The three argument overload is necessary for bulk access to the data. This is much more efficient than byte-by-byte access.

See Also

[Android Documentation]

Requirements

Namespace: Java.IO
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1