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

## [](#tohex1)toHex(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" }
```