---
schema_version: "1"
id: 8fbb4dcb3bc8df91ef316016f222dc02ae464ae2c2f057a8146a0dc591b37e4d
title: Text Java Properties Format
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/dataweave/2.11/dataweave-formats-properties.md
canonical_url: https://docs.mulesoft.com/dataweave/2.11/dataweave-formats-properties
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 63ad71620755568c3b8fc073f984ab1418e35715c73c1b525a20447d1b563289
description: MuleSoft Documentation Site
release: "2.11"
latest: false
---
---
product: DataWeave
version: 2.11
keywords: format, properties, */x-java-properties, */properties, text/x-java-properties
---

# Text Java Properties Format

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

MIME type: `text/x-java-properties`

ID: `properties`

The Text Java Properties format parses any Java properties file. This format represents simple
key-value pairs. DataWeave represents these pairs as an object with string values.

## Example: Represent a properties File in the DataWeave Format (dw)

This example shows how DataWeave represents a properties file.

### Input

The following `text/x-java-properties` data is from a properties file. The file contains key-value
pairs that provide host and port values. This content serves as the input payload to the DataWeave
script.

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

### Source

The DataWeave script transforms the `text/x-java-properties` input payload to the DataWeave (dw)
format and MIME type. It returns a string.

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

### Output

The output is an object in the DataWeave (dw) format. The object contains a collection of key-value
pairs that match the `text/x-java-properties` input. Notice that the output wraps the values in
quotation marks.

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

## Configuration Properties

DataWeave supports the following configuration properties for this format.

### Reader Properties

There are no reader properties for this format.

### Writer Properties

This format accepts properties that provide instructions for writing output data.

<table><colgroup><col> <col> <col> <col></colgroup><thead><tr><th>Parameter</th><th>Type</th><th>Default</th><th>Description</th></tr></thead><tbody><tr><td><p><code>bufferSize</code></p></td><td><p><code>Number</code></p></td><td><p><code>8192</code></p></td><td><div><div><p>Size of the buffer writer, in bytes. The value must be greater than <code>8</code>.</p></div></div></td></tr><tr><td><p><code>deferred</code></p></td><td><p><code>Boolean</code></p></td><td><p><code>false</code></p></td><td><div><div><p>Generates the output as a data stream when set to <code>true</code>, and defers the script’s execution until the generated content is consumed.</p></div><div><p>Valid values are <code>true</code> or <code>false</code>.</p></div></div></td></tr><tr><td><p><code>encoding</code></p></td><td><p><code>String</code></p></td><td><p><code>null</code></p></td><td><div><div><p>The encoding to use for the output, such as UTF-8.</p></div></div></td></tr></tbody></table>

## Supported MIME Types

This format supports the following MIME types.

<table><colgroup><col></colgroup><thead><tr><th>MIME Type</th></tr></thead><tbody><tr><td><p><code>*/x-java-properties</code></p></td></tr><tr><td><p><code>*/properties</code></p></td></tr></tbody></table>
