BytesMessage.ReadBytes


Method

Declaration

int ReadBytes(byte[] value); 
 
int ReadBytes(byte[] value, int length); 

Purpose

Read bytes to a byte array from the byte stream in the message body.

Parameters

Parameter
Description
value

The program supplies a byte array. The call fills it with bytes from the byte stream.

length
Read (at most) this number of bytes from the stream.
When present, the length argument must be between zero and value.length (inclusive); otherwise the call throws a System.IndexOutOfRangeException (and does not read any bytes).

Remarks

Each call reads bytes from the stream into the byte array, and advances the read position.

When the program supplies a length argument, the call attempts to read length bytes; otherwise it attempts to read value.length bytes.

Returns

This call returns the actual number of bytes read. When the call cannot read even one byte, it returns -1.


TIBCO Enterprise Message Service™ .NET Reference
System Release 4.3, February 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com