[#BloombergLP-bslx-ByteOutStream]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslx.adoc[bslx]::ByteOutStream
:relfileprefix: ../../
:mrdocs:

Provide a BDEX output stream that externalizes values to a byte buffer&period;

== Synopsis

Declared in `&lt;bslx&lowbar;byteoutstream&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ByteOutStream;
----

== Description

This class provides output methods to externalize values, and C&hyphen;style arrays of values, of the fundamental integral and floating&hyphen;point types, as well as `bsl&colon;&colon;string` values&period; In particular, each `put` method of this class is guaranteed to write stream data that can be read by the corresponding `get` method of `bslx&colon;&colon;ByteInStream`&period; See the `bslx` package&hyphen;level documentation for the definition of the BDEX `OutStream` protocol&period;

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslx/ByteOutStream/2constructor-074.adoc[`ByteOutStream`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslx/ByteOutStream/2destructor.adoc[`&#126;ByteOutStream`] [.small]#[destructor]#
| Destroy this object&period;
| xref:BloombergLP/bslx/ByteOutStream/bdexVersionSelector.adoc[`bdexVersionSelector`] 
| Return the `versionSelector` to be used with `operator&lt;&lt;` for BDEX streaming as per the `bslx` package&hyphen;level documentation&period;
| xref:BloombergLP/bslx/ByteOutStream/data.adoc[`data`] 
| Return the address of this stream&apos;s contiguous internal buffer&period;
| xref:BloombergLP/bslx/ByteOutStream/invalidate.adoc[`invalidate`] 
| Put this output stream in an invalid state&period; This function has no effect if this stream is already invalid&period;
| xref:BloombergLP/bslx/ByteOutStream/isValid.adoc[`isValid`] 
| Return `true` if this stream is valid, and `false` otherwise&period;
| xref:BloombergLP/bslx/ByteOutStream/length.adoc[`length`] 
| Return the number of bytes in this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayFloat32.adoc[`putArrayFloat32`] 
| Write an array of four&hyphen;byte IEEE single&hyphen;precision values to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayFloat64.adoc[`putArrayFloat64`] 
| Write an array of eight&hyphen;byte IEEE double&hyphen;precision values to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt16.adoc[`putArrayInt16`] 
| Write an array of two&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt24.adoc[`putArrayInt24`] 
| Write an array of three&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt32.adoc[`putArrayInt32`] 
| Write an array of four&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt40.adoc[`putArrayInt40`] 
| Write an array of five&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt48.adoc[`putArrayInt48`] 
| Write an array of six&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt56.adoc[`putArrayInt56`] 
| Write an array of seven&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt64.adoc[`putArrayInt64`] 
| Write an array of eight&hyphen;byte signed integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayInt8-0b.adoc[`putArrayInt8`] 
| `putArrayInt8` overloads
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint16.adoc[`putArrayUint16`] 
| Write an array of two&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint24.adoc[`putArrayUint24`] 
| Write an array of three&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint32.adoc[`putArrayUint32`] 
| Write an array of four&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint40.adoc[`putArrayUint40`] 
| Write an array of five&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint48.adoc[`putArrayUint48`] 
| Write an array of six&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint56.adoc[`putArrayUint56`] 
| Write an array of seven&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint64.adoc[`putArrayUint64`] 
| Write an array of eight&hyphen;byte unsigned integers to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putArrayUint8-0e.adoc[`putArrayUint8`] 
| `putArrayUint8` overloads
| xref:BloombergLP/bslx/ByteOutStream/putFloat32.adoc[`putFloat32`] 
| Write a four&hyphen;byte IEEE single&hyphen;precision value to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putFloat64.adoc[`putFloat64`] 
| Write an eight&hyphen;byte IEEE double&hyphen;precision value to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt16.adoc[`putInt16`] 
| Write a two&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt24.adoc[`putInt24`] 
| Write a three&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt32.adoc[`putInt32`] 
| Write a four&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt40.adoc[`putInt40`] 
| Write a five&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt48.adoc[`putInt48`] 
| Write a six&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt56.adoc[`putInt56`] 
| Write a seven&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt64.adoc[`putInt64`] 
| Write an eight&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putInt8.adoc[`putInt8`] 
| Write a one&hyphen;byte signed integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putLength.adoc[`putLength`] 
| Write the specified `length` to this stream using BDEX length encoding&period;
| xref:BloombergLP/bslx/ByteOutStream/putString.adoc[`putString`] 
| Write the length and characters of the specified `value` to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint16.adoc[`putUint16`] 
| Write a two&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint24.adoc[`putUint24`] 
| Write a three&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint32.adoc[`putUint32`] 
| Write a four&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint40.adoc[`putUint40`] 
| Write a five&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint48.adoc[`putUint48`] 
| Write a six&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint56.adoc[`putUint56`] 
| Write a seven&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint64.adoc[`putUint64`] 
| Write an eight&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putUint8.adoc[`putUint8`] 
| Write a one&hyphen;byte unsigned integer to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/putVersion.adoc[`putVersion`] 
| Write the specified one&hyphen;byte `version` to this stream&period;
| xref:BloombergLP/bslx/ByteOutStream/reserveCapacity.adoc[`reserveCapacity`] 
| Set the internal buffer size of this stream to be at least the specified `newCapacity` (in bytes)&period;
| xref:BloombergLP/bslx/ByteOutStream/reset.adoc[`reset`] 
| Remove all content in this stream and validate this stream if it is currently invalid&period;
| xref:BloombergLP/bslx/ByteOutStream/2conversion.adoc[`operator void const*`] 
| Return a non&hyphen;null pointer if this stream is valid, and null otherwise&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bslx/operator_lshift-0f5.adoc[BloombergLP::bslx::operator&lt;&lt;]`
| Write the specified `object` to the specified output `stream` in some reasonable (multi&hyphen;line) format, and return a reference to `stream`&period;
|===

== Non-Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslx/operator_lshift-0fc.adoc[`operator&lt;&lt;`]
| Write the BDEX&hyphen;compliant `value` to the specified output `stream`&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
