Instance Method

getBytes(_:)

Copies a data object’s contents into a given buffer.

Declaration

func getBytes(_ buffer: UnsafeMutableRawPointer)

Parameters

buffer

A buffer into which to copy the receiver's data. The buffer must be at least length bytes.

Discussion

You can see a sample using this method in Working With Binary Data.