Java.IO.InputStream Class
A readable source of bytes.

See Also: InputStream Members

Syntax

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

Remarks

A readable source of bytes.

Most clients will use input streams that read data from the file system (Java.IO.FileInputStream), the network (Java.Net.Socket.InputStream/Java.Net.URLConnection.InputStream), or from an in-memory byte array (Java.IO.ByteArrayInputStream).

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

Most clients should wrap their input stream with Java.IO.BufferedInputStream. Callers that do only bulk reads may omit buffering.

Some implementations support marking a position in the input stream and resetting back to this position later. Implementations that don't return false from InputStream.MarkSupported and throw an Java.IO.IOException when InputStream.Reset is called.

Subclassing InputStream

Subclasses that decorate another input stream should consider subclassing Java.IO.FilterInputStream, which delegates all calls to the source input stream.

All input stream subclasses should override bothInputStream.Read and InputStream.Read(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