public int readBytes(byte[] value, int length) throws JMSException
{
if (!bodyReadOnly)
{
throw new MessageNotReadableException("The message body is writeonly");
}
((JBossBytesMessage)message).checkRead();
return ((BytesMessage)message).readBytes(value, length);
}