BinaryStreamBaseInsertBytes Method
Inserts a certain number of bytes into the stream, shifting valid data to the right. The stream's position remains unchanged.
(i.e., pointing to the beginning of the newly inserted bytes).
Namespace: SnapDB.IOAssembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public void InsertBytes(
int numberOfBytes,
int lengthOfValidDataToShift
)
Public Sub InsertBytes (
numberOfBytes As Integer,
lengthOfValidDataToShift As Integer
)
public:
void InsertBytes(
int numberOfBytes,
int lengthOfValidDataToShift
)
function InsertBytes(numberOfBytes, lengthOfValidDataToShift);
Parameters
- numberOfBytes Int32
- The number of bytes to insert
- lengthOfValidDataToShift Int32
- The number of bytes that will need to be shifted to perform this insert
Internally this function merely accomplishes an Array.Copy(stream,position,stream,position+numberOfBytes,lengthOfValidDataToShift)
However, it's much more complicated than this. So this is a pretty useful function.
The newly created space is uninitialized.