Instance Method

get​Bytes(_:​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.

See Also

Related Symbols

func get​Bytes(Unsafe​Mutable​Raw​Pointer)

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

var bytes:​ Unsafe​Raw​Pointer

A pointer to the receiver’s contents.

func get​Bytes(Unsafe​Mutable​Raw​Pointer, range:​ NSRange)

Copies a range of bytes from the receiver’s data into a given buffer.

var description:​ String

A string that contains a hexadecimal representation of the object’s contents in a property list format.