---
schema_version: "1"
id: 627e4e3cd8297710b804fdb7dec8e87e87b580eb6637d9aa9ffca8188020cda3
title: テキスト Java プロパティ形式
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/dataweave/2.5/dataweave-formats-properties.md
canonical_url: https://docs.mulesoft.com/jp/dataweave/2.5/dataweave-formats-properties
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 3fc423e7b93e80309c825b89917beefb292ce1c4d7d1c428d06b3f41493f6c3f
description: MuleSoft Documentation Site
release: "2.5"
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)Configuration のプロパティ

DataWeave では、この形式の以下の設定プロパティがサポートされています。

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

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

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

この形式は、出力データを書き込むための指示を提供するプロパティを受け入れます。

<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>バッファライターのサイズ (バイト)。値は 8 よりも大きい必要があります。</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>​ に設定すると、出力をデータストリームとして生成し、スクリプトの実行は生成されたコンテンツがコンシュームされるまで延期されます。</p>
</div>
<div class="paragraph">
<p>有効な値は、​<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>出力で使用するエンコード (UTF-8 など)。</p>
</div></div></td>
</tr>
</tbody>
</table>

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

この形式では、次の 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>