Returns a pointer to a stream’s internal buffer of unread data, if possible.
- iOS 2.0+
- macOS 10.1+
- Mac Catalyst 13.0+
- tvOS 9.0+
- watchOS 2.0+
- Core Foundation
The stream to examine.
The maximum number of bytes to read. If greater than
maxlimits the number of bytes read; if
Bytes To Read
0or less, all available bytes are read.
On return, contains the length of returned buffer. If
streamis not open or has encountered an error,
numis set to
A pointer to the internal buffer of unread data for
stream, if possible;
NULL otherwise. The buffer is good only until the next stream operation called on the stream. You should neither change the contents of the returned buffer nor attempt to deallocate the buffer; it is still owned by the stream. The bytes returned in the buffer are considered read from the stream.