[#BloombergLP-bdlde-Utf8CheckingInStreamBufWrapper-xsgetn]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlde.adoc[bdlde]::xref:BloombergLP/bdlde/Utf8CheckingInStreamBufWrapper.adoc[Utf8CheckingInStreamBufWrapper]::xsgetn
:relfileprefix: ../../../
:mrdocs:

Read up to the specified number of characters into the buffer&period;

== Synopsis

Declared in `&lt;bdlde&lowbar;utf8checkinginstreambufwrapper&period;h&gt;`

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

== Description

Read up to the specified `numBytes` characters from this object to the specified `buffer` and return the number of characters successfully read&period; A return value of 0 means that either a UTF&hyphen;8 error or end of file has been encountered (`errorStatus` must be called to distinguish between the two), but a non&hyphen;zero return value less than `numBytes` will usually be returned when neither end of file nor a UTF&hyphen;8 error has been encountered&period; The behavior is undefined unless `4 &lt;&equals; numBytes`&period; Note that this function is forwarded to by the public method `sgetn` in the base class&period;

== Return Value

the number of characters successfully read

== Parameters

[cols="1,4"]
|===
| Name| Description
| *buffer*
| destination for characters read from this object
| *numBytes*
| maximum number of characters to read
|===


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