---
schema_version: "1"
id: 63cf6b40171fbe2583529b5e0680761e0490e42ab37466ba64a04920e46b3811
title: テキスト Java プロパティ形式
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.3/dataweave-formats-properties.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.3/dataweave-formats-properties
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f72c066229d4e1b37a5044b154777a982eef48869fc2266ea9fb9ed476dffac5
description: MuleSoft Documentation Site
release: "2.3"
latest: false
---
# テキスト Java プロパティ形式

MIME タイプ: `text/x-java-properties`​

ID: `properties`​

テキスト Java プロパティ形式では、Java プロパティファイルを解析します。この形式は、単純なキー-値ペアを表します。DataWeave では、文字列値が含まれるオブジェクトとしてこれらのペアを表します。

## [](#examples)例: プロパティファイルを DataWeave 形式 (dw) で表す

次の例は、DataWeave でプロパティファイルを表す方法を示しています。

### [](#入力)入力

次の ​`text/x-java-properties`​ データは、プロパティファイルから取得します。このファイルには、ホストとポートの値を提供するキー-値ペアが含まれます。このコンテンツは、DataWeave スクリプトへの入力ペイロードとして機能します。

```properties
host=localhost
port=1234
```

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

この DataWeave スクリプトは、​`text/x-java-properties`​ 入力ペイロードを DataWeave (dw) 形式と MIME タイプに変換します。このスクリプトは、文字列を返します。

```dataweave
%dw 2.0
output application/dw
---
payload
```

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

出力は、DataWeave (dw) 形式のオブジェクトになります。オブジェクトには、​`text/x-java-properties`​ 入力と一致するキー-値ペアのコレクションが含まれます。出力では、値が引用符で囲まれています。

```dataweave
{
    host: "localhost",
    port: "1234"
}
```

## [](#properties_java_properties)Configuration のプロパティ

DataWeave では、テキスト Java プロパティ形式の次の設定プロパティがサポートされています。

### [](#reader-のプロパティ)Reader のプロパティ

この形式のリーダープロパティはありません。

### [](#writer-のプロパティ)Writer のプロパティ

テキスト Java プロパティ形式では、出力データの書き込みの指示を提供するプロパティを使用できます。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 16.6666%;">
<col style="width: 16.6666%;">
<col style="width: 16.6666%;">
<col style="width: 50.0002%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">パラメーター</th>
<th class="tableblock halign-left valign-top">型</th>
<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>bufferSize</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>Number</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>8192</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>ライターバッファのサイズ。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>deferred</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>Boolean</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>false</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>​<code>true</code>​ に設定すると、DataWeave は出力をデータストリームとして生成し、スクリプトの実行はそれがコンシュームされるまで延期されます。
  有効な値は、​<code>true</code>​ または ​<code>false</code>​ です。</p>
</div></div></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>encoding</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>String</code></p></td>
<td class="tableblock halign-left valign-top"><p class="tableblock">​<code>null</code></p></td>
<td class="tableblock halign-left valign-top"><div class="content"><div class="paragraph">
<p>使用するライターのエンコード。</p>
</div></div></td>
</tr>
</tbody>
</table>

## [](#mime_type_java_properties)サポートされる MIME タイプ

Java プロパティ形式では、次の MIME タイプがサポートされています。

<table class="tableblock frame-all grid-all stretch">
<colgroup>
<col style="width: 100%;">
</colgroup>
<thead>
<tr>
<th class="tableblock halign-left valign-top">MIME タイプ</th>
</tr>
</thead>
<tbody>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>*/x-java-properties</code>​</p></td>
</tr>
<tr>
<td class="tableblock halign-left valign-top"><p class="tableblock"><code>*/properties</code>​</p></td>
</tr>
</tbody>
</table>