You are here: Start » Function Reference » All Functions » Binary Data » WriteBufferToBuffer
This is Filter Equivalent. This function may be present in generated code, but should not be used in hand-written code.
Header: | STD.h |
---|---|
Namespace: | fil |
Module: | FoundationLite |
Writes content of a source byte buffer into other byte buffer.
Syntax
void fil::WriteBufferToBuffer ( const fil::ByteBuffer& inBuffer, ftl::Optional<int> inOffset, const fil::ByteBuffer& inSourceBuffer, int inSourceOffset, ftl::Optional<int> inSourceLength, fil::ByteBuffer& outBuffer )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inBuffer | const ByteBuffer& | Initial buffer to be expanded | ||
![]() |
inOffset | Optional<int> | 0 - ![]() |
NIL | Write destination position |
![]() |
inSourceBuffer | const ByteBuffer& | Buffer containing source data to be copied | ||
![]() |
inSourceOffset | int | 0 - ![]() |
0 | Copy start position in source data |
![]() |
inSourceLength | Optional<int> | 0 - ![]() |
NIL | Length of data to be copied in bytes |
![]() |
outBuffer | ByteBuffer& | Resulting data |
In-place Processing
This function supports in-place data processing - you can pass the same reference to inBuffer and outBuffer
Read more about In-place Computation.
Description
This filter is intended for transferring raw binary data between byte buffers.
Source data is acquired from the buffer at the inSourceBuffer input, starting at the position determined by the inSourceOffset input (in bytes) and limited to the length determined by the inSourceLength input. When the inSourceLength input is set to Auto source data is read from the start position up to the end of inSourceBuffer.
Resulting ByteBuffer data on the outBuffer output is created by expanding data from buffer on the inBuffer input. Data is written starting at the position specified by the inOffset input (in bytes). When written data spans beyond the end of the input buffer the resulting buffer length is expanded (event when inOffset points beyond the end of the input buffer). When the inOffset input is set to Auto data is written at the end of the input buffer.
Errors
List of possible exceptions:
Error type | Description |
---|---|
IoError | Reading beyond the end of the source byte buffer. Data block specified by the inSourceOffset and inSourceLength inputs spans beyond the end of the source byte buffer (inSourceBuffer). |
IoError | Resulting buffer size is too large. |