WebLogic Messaging API Class Library |

# IBytesMessage. Method

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.

#### Overload List

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 (Byte[]);

Reads a portion of 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. If `length` is negative, or `length` is greater than the length of the array `value`, then an `IndexOutOfBoundsException` is thrown. No bytes will be read from the stream for this exception case.

> int (Byte[],Int32);

#### See Also

IBytesMessage Interface | WebLogic.Messaging Namespace