### Method

# Hex Document set_buffer

since: 4.2

#### Declaration

    gboolean
    hex_document_set_buffer (
      HexDocument* doc,
      HexBuffer* buf
    )

#### Description

Set the `HexBuffer` connected with the `HexDocument`.

Available since: 4.2

Sets property | `Hex.Document:buffer`

#### Parameters

`buf`

  Type: `HexBuffer`

  `HexBuffer`.

  The instance takes ownership of the data, and is responsible for freeing it.

#### Return value

Type: `gboolean`

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