Instance Method


Synchronously reads the available data up to the end of file or maximum number of bytes.


func readDataToEndOfFile() -> Data

Return Value

The data available through the receiver up to maximum size that can be represented by an NSData object or, if a communications channel, until an end-of-file indicator is returned.


This method invokes readData(ofLength:) as part of its implementation.

See Also

Reading from a File Handle

var availableData: Data

The data currently available in the receiver.

func readData(ofLength: Int) -> Data

Synchronously reads data up to the specified number of bytes.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software