WebLogic Messaging API Class Library

IBytesMessage.ReadBytes\xA0Method\xA0(Byte[])

Reads a byte array from the bytes message stream.

If the length of array value is less than the number of bytes remaining to be read from the stream, the array will be filled. A subsequent call reads the next increment, and so on.

If the number of bytes remaining in the stream is less than the length of array value, the bytes will be read into the array. The return value of the total number of bytes read will be less than the length of the array, indicating that there are no more bytes left to be read from the stream. The next read of the stream returns -1.

int\xA0ReadBytes(
\xA0\xA0\xA0Byte[]\xA0value
);

Parameters

Byte[]
the buffer into which the data is read

Return Value

the total number of bytes read into the buffer, or -1 if there is no more data because the end of the stream has been reached

Exceptions

Exception TypeCondition
MessageExceptionif JMS fails to read the message due to some internal error.
MessageNotReadableExceptionif the message is in write-only mode.

See Also

IBytesMessage Interface | WebLogic.Messaging Namespace | IBytesMessage. Overload List