Contents

readBytes(withExactLength:)

Reads the number of bytes you specify from the read buffers and return result as a data object.

Declaration

func readBytes(withExactLength exactLength: Int) throws -> Data

Parameters

  • exactLength:

    Number of bytes to read from the read buffers.

Return Value

An NSData object filled with the memory that the framework read, or nil if the read failed.

Discussion

Memory is copied into the newly allocated buffer represented by the returned NSData object.