Hex.Buffer.set_data
Description: Reference for Hex.Buffer.set_data

### Virtual Method

# Hex Bufferset_data

#### Declaration

    gboolean
    set_data (
      HexBuffer* self,
      gint64 offset,
      size_t len,
      size_t rep_len,
      char* data
    )

#### Description

Set data at of the buffer at a particular offset, replacing some, all or none of the existing data in the buffer as desired.

As `data` will be copied to the recipient, it should be freed with `g_free()` after being passed to this method, to avoid a memory leak.

#### Parameters

`offset`

  Type: `gint64`

  Offset position of the data being requested within the payload.

`len`

  Type: `size_t`

  Size in bytes of the input data being provided.

`rep_len`

  Type: `size_t`

  Amount of bytes to replace/overwrite (if any).

`data`

  Type: An array of `gint8`

  A pointer to the data being provided.

  The length of the array is specified in the `len` argument.
  The data is owned by the caller of the method.

#### Return value

Type: `gboolean`

`TRUE` if the operation was successful; `FALSE` otherwise.