Splits chunk of data from byte buffer into array of buffers of equal sizes.
|inOffset||Integer||0 -||Read start position|
|inElementSize||Integer||0 -||Length in bytes of single array element|
|inElementsCount||Integer||0 - 33554432||Amount of array elements to read|
|outArray||ByteBufferArray||Buffers array with copied data|
|outOffset||Integer||Resulting position behind read data|
This filter can be helpful when reading an array from byte buffer. It can split a portion of data from the source buffer on the inBuffer input and split it into specified number of buffers returned on the outArray outputs. All buffers in the items of the output array must have the same size. Size of resulting buffers is specified by the inElementSize input. Number of buffers in the resulting array is specified by the inElementsCount input. Total number of bytes read by this filter can be calculated by multiplying the values from the inElementSize and inElementsCount inputs.
Data is read starting at the position provided by the inOffset input (in bytes). This position is than advanced by the size of read data and returned on the outOffset output. This output can be connected to the inOffset input of other byte buffer reading filter when reading consecutive fields of data structures. When data read spans beyond the end of the input buffer an IOError is raised.
This filter is usually a beginning of an array execution of other buffer reading filters.
This filter can throw an exception to report error. Read how to deal with errors in Error Handling.
List of possible exceptions:
|IoError||Empty byte buffer at input of ReadBufferArrayFromBuffer.|
|IoError||Reading beyond the end of the byte buffer.|
This filter is available on Basic Complexity Level.
This filter is member of ReadFromBuffer filter group.
- WriteBufferArrayToBuffer – Writes connected content of all source buffer array items into other byte buffer.