Collapse All Expand All

.NET Framework Class Library
MapMessage Class See Also

[TIBCO.EMS.UFOCLIENT .NET client library 5.1 documentation]

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

Namespace: TIBCO.EMS.UFO
Assembly: TIBCO.EMS.UFO (in TIBCO.EMS.UFO.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
--- | ---
MessageNotWriteableException | An TIBCO.EMS.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.UFO Namespace