# Blob.CreateOutStream(OutStream [, TextEncoding]) Method
> Version: _Available or changed with runtime version 1.0._
Creates an OutStream object for a binary large object (BLOB). This enables you to write data to the BLOB.
## Syntax
```al
 Blob.CreateOutStream(OutStream: OutStream [, Encoding: TextEncoding])
```
## Parameters
Blob
Type: blob-data-type
An instance of the blob-data-type data type.
OutStream
Type: ../outstream/outstream-data-type
The OutStream object type that has been created.
*[Optional] Encoding*
Type: ../textencoding/textencoding-option
The encoding that will be used by the stream. The default encoding is MSDos.
Optionally, you can specify the encoding on the stream. By specifying the ../../devenv-file-handling-and-text-encoding, you ensure that all the language-specific characters are represented correctly in Dynamics 365 when you read data and write data. The following example illustrates how you can set the encoding to Windows when you create a stream for a BLOB field.
```
MyTable.MyBLOBfield.CreateOutStream(MyStream, TextEncoding::WINDOWS);
```
See ../../devenv-file-handling-and-text-encoding.
## Related information
blob-data-type
Get Started with AL<../../devenv-get-started>
Developing Extensions<../../devenv-dev-overview>

Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/blob/blob-createoutstream-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact. https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/blob/blob-createoutstream-method/
