---
schema_version: "1"
id: 893322a3830836c21b0e1bd93a9027a8199509b33955cc66309b1746adc7de8d
title: toHex
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.5/dw-binaries-functions-tohex.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.5/dw-binaries-functions-tohex
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3e34f542435a49d6b394dd56a69df8e0a75a6f467c4f93e7d19fa7a7b8effdbb
description: MuleSoft Documentation Site
release: "2.5"
latest: false
---
# toHex

## [](#tohex1)toHex(content: Binary): String

バイナリ値を 16 進文字列に変換します。

### [](#パラメーター)パラメーター

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 25%;">
<col style="width: 75%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">名前</th>
<th class="tableblock halign-left valign-top">説明</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>content</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">変換する ​<code>Binary</code>​ 値。</p></td>
</tr>
</tbody>
</table>

### [](#例)例

次の例では、バイナリバージョンの「Mule」 (変数 ​`myBinary`​ で定義) を 16 進値に変換します。

#### [](#ソース)ソース

```DataWeave
%dw 2.0
import * from dw::core::Binaries
output application/json
var myBinary = "Mule" as Binary
var testType = typeOf(myBinary)
---
{
   "binaryToHex" : toHex(myBinary)
}
```

#### [](#出力)出力

```JSON
{ "binaryToHex": "4D756C65" }
```