[TIBCO.EMS .NET client library 6.0 documentation]

Writes a portion of a byte array as a byte array field to the stream message.

Namespace:  TIBCO.EMS
Assembly:  TIBCO.EMS (in TIBCO.EMS.dll)

Syntax

public void WriteBytes(
	byte[] value,
	int offset,
	int length
)
Public Sub WriteBytes ( _
	value As Byte(), _
	offset As Integer, _
	length As Integer _
)
public:
void WriteBytes(
	array<unsigned char>^ value, 
	int offset, 
	int length
)

Parameters

value
Type: array< System..::.Byte >[]()[]
the byte value to be written
offset
Type: System..::.Int32
the initial offset within the byte array
length
Type: System..::.Int32
the number of bytes to use

Remarks

Each call writes bytes from the byte array to the stream and advances the write position so that the next write call appends to the new end of the stream.

The a portion of the byte array value is written to the message as a byte array field. Consecutively written byte array fields are treated as two distinct fields when the fields are read.

This method attempts to write the specified bytes to the stream; otherwise it attempts to write the entire byte array. The offset and length arguments must be between zero and value.length (inclusive) and their sum must also fall within the same range. That is, these two arguments must specify a span of bytes within the value argument. Otherwise the call throws an IndexOutOfRangeException (and does not write any bytes).

See Also