Instance Method

getBytes(_:length:)

Copies a number of bytes from the start of the receiver's data into a given buffer.

Declaration

func getBytes(_ buffer: UnsafeMutableRawPointer, length: Int)

Parameters

buffer

A buffer into which to copy data.

length

The number of bytes from the start of the receiver's data to copy to buffer.

Discussion

The number of bytes copied is the smaller of the length parameter and the length of the data encapsulated in the object.