Method WriteBytesSafe
WriteBytesSafe(byte*, int, int)
Write multiple bytes to the stream
"Safe" version - automatically performs bounds checking. Less efficient than bounds checking for multiple writes at once by calling TryBeginWrite.
Declaration
public void WriteBytesSafe(byte* value, int size, int offset = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| byte* | value | Value to write |
| int | size | Number of bytes to write |
| int | offset | Offset into the buffer to begin writing |
WriteBytesSafe(byte[], int, int)
Write multiple bytes to the stream
"Safe" version - automatically performs bounds checking. Less efficient than bounds checking for multiple writes at once by calling TryBeginWrite.
Declaration
public void WriteBytesSafe(byte[] value, int size = -1, int offset = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| byte[] | value | Value to write |
| int | size | Number of bytes to write |
| int | offset | Offset into the buffer to begin writing |
WriteBytesSafe(NativeArray<byte>, int, int)
Write multiple bytes to the stream
Declaration
public void WriteBytesSafe(NativeArray<byte> value, int size = -1, int offset = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeArray<byte> | value | Value to write |
| int | size | Number of bytes to write |
| int | offset | Offset into the buffer to begin writing |
WriteBytesSafe(NativeList<byte>, int, int)
Write multiple bytes to the stream
Declaration
public void WriteBytesSafe(NativeList<byte> value, int size = -1, int offset = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| NativeList<byte> | value | Value to write |
| int | size | Number of bytes to write |
| int | offset | Offset into the buffer to begin writing |