Reads up to a given number of bytes into a given buffer.
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
A data buffer. The buffer must be large enough to contain the number of bytes specified by
The maximum number of bytes to read.
A number indicating the outcome of the operation:
A positive number indicates the number of bytes read.
0indicates that the end of the buffer was reached.
-1means that the operation failed; more information about the error can be obtained with