Foundation.NSInputStream.Read Method
Reads data from the stream into the provided buffer. You should not call this method directly, you should call NSInputStream.Read(byte[], uint) instead. This method is for NSInputStream subclasses to implement.

Syntax

[Foundation.Export("read:maxLength:")]
public virtual nint Read (IntPtr buffer, nuint len)

Parameters

buffer
The buffer where data should be put.
len
The size of the buffer (in bytes).

Returns

The number of bytes actually written.

Remarks

You can use methods in System.Runtime.InteropServices.Marshal to write to the buffer (for instance: System.Runtime.InteropServices.Marshal.Copy(byte[], int, IntPtr, int) to write from a byte array).

Requirements

Namespace: Foundation
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0