### Method

# Hex Document set_data

#### Declaration

    void
    hex_document_set_data (
      HexDocument* doc,
      gint64 offset,
      size_t len,
      size_t rep_len,
      char* data,
      gboolean undoable
    )

#### Description

A convenience wrapper for `hex_buffer_set_data()`. See the description of that method for details.

#### Parameters

`offset`

  Type: `gint64`

  Offset in bytes within the payload.

`len`

  Type: `size_t`

  Length in bytes of the data to be set.

`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.

`undoable`

  Type: `gboolean`

  Whether the operation should be undoable.