Collapse All Expand All

.NET Framework Class Library
MapMessage Class See Also

[TIBCO.EMS .NET client library 5.1 documentation]

Sets a portion of the byte array value with the specified name into the Map.

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

# Syntax

    public void SetBytes(
    	string name,
    	byte[] value,
    	int offset,
    	int length
    )

    Public Sub SetBytes ( _
    	name As String, _
    	value As Byte(), _
    	offset As Integer, _
    	length As Integer _
    )

    public:
    void SetBytes(
    	String^ name,
    	array<unsigned char>^ value,
    	int offset,
    	int length
    )

#### Parameters

name
  Type: System..::.String
  The name of the boolean.

value
  Type: array< System..::.Byte >[]()[]
  The byte array value to set in the Map

offset
  Type: System..::.Int32
  the initial offset within the byte array

length
  Type: System..::.Int32
  the number of bytes to use

# Remarks

This method extracts the specified bytes and uses them as the value; otherwise it uses 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, this method throws an System.IndexOutOfRangeException and does not set any value.

# Exceptions

Exception | Condition
--- | ---
TIBCO.EMS..::.MessageNotWriteableException | An MessageNotWriteableException may be thrown if the message is in read-only mode
System..::.ArgumentException | An ArgumentException may be thrown if value is null
System..::.IndexOutOfRangeException | An IndexOutOfRangeException may be thrown if the offset and length arguments do not specify a span of bytes within the array specified by the value argument.

# See Also

MapMessage Class
SetBytes Overload
TIBCO.EMS Namespace