[#BloombergLP-bdls-FdStreamBuf-xsputn]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdls.adoc[bdls]::xref:BloombergLP/bdls/FdStreamBuf.adoc[FdStreamBuf]::xsputn
:relfileprefix: ../../../
:mrdocs:

Write up to `numBytes` characters from `buffer`&period;

== Synopsis

Declared in `&lt;bdls&lowbar;fdstreambuf&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
virtual
std::streamsize
xsputn(
    char const* buffer,
    std::streamsize numBytes) override;
----

== Description

Write up to the specified `numBytes` characters from the specified `buffer` and return the number of characters successfully written&period; Note that this method does not necessarily modify the file&colon; this method may simply write the characters to a buffer to be flushed to the file at a later time&period; Also note that on a Windows text file, a &grave; &grave; will be written to the file as &grave;&bsol;r &grave; (counted as a single character)&period;

== Return Value

the number of characters successfully written

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| characters to write
| *numBytes*
| maximum number of characters to write
|===


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