Writes the contents of a provided data buffer to the receiver.
- iOS 2.0+
- macOS 10.3+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
The data to write.
The length of the data buffer, in bytes.
A number indicating the outcome of the operation:
A positive number indicates the number of bytes written.
0indicates that a fixed-length stream and has reached its capacity.
-1means that the operation failed; more information about the error can be obtained with