> ## Documentation Index
> Fetch the complete documentation index at: https://docs.arc.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# messageRead

> メッセージアイテムの内容を読み取り、メッセージ本文全体を単一のアウトプット文字列として返します。さまざまな文字エンコーディングをサポートします。

メッセージアイテムの内容を読み取り、メッセージ本文を単一のアウトプット文字列で返します。

## オプションのパラメータ

* **encoding**：メッセージデータを文字列としてデコードするために使用するエンコーディング。使用できる値は、使用しているJVM/OS によって決まります。ほとんどのオペレーティングシステムおよびJVM で一般的にサポートされるエンコーディングの値には、`UTF-8`、`ASCII`、`BASE64`、`Hex`、`windows-1252`、および `ISO-8859-2` が含まれます。デフォルトは`UTF-8` です。

## アウトプット属性

* **data**：メッセージデータ。

## 例

### カンマをパイプ文字（ | ）に置換する

```xml theme={null}
<!-- Calling messageRead and replacing all commmas with pipes -->
<arc:call op="messageRead" out="result" >
  <arc:set attr="messageOut.data" value="[result.data | replace(',','|')]" />
</arc:call>

<!-- Checking to make sure the output message has data, else throw an error -->
<arc:check attr="messageOut.data" >
  <arc:set attr="messageOut.filename" value="[FileName]" />
  <arc:push item="messageOut" />
  <arc:else>
    <arc:throw code="NoData" desc="No message data." />
  </arc:else>
</arc:check>
```
