new_copy_data


Description:

public static Buffer new_copy_data (uint8[] data)

Create a new buffer and set the data to a copy of data.length bytes of data and the size to data.length.

The data will be freed when the buffer is freed.

Parameters:

data

data for the new buffer

len

the length of data

Returns:

A newly allocated buffer with a copy of data and of size data.length.