if (bodyWriteOnly)
if (!bodyReadOnly)
   public int readBytes(byte[] value) throws JMSException   {      if (bodyWriteOnly)         throw new MessageNotReadableException("The message body is writeonly");      try      {         Object myObj = ((List)payload).get(position);         if (myObj == null)            throw new NullPointerException("Value is null");         else if (!(myObj instanceof byte[]))            throw new MessageFormatException("Invalid conversion");         byte[] obj = (byte[]) myObj;         if (obj.length == 0)         {            position++;            offset = 0;            return 0;         }         if (offset >= obj.length)         {            position++;            offset = 0;            return -1;         }         if (obj.length - offset < value.length)         {            for (int i = 0; i < obj.length; i++)               value[i] = obj[i + offset];            position++;            offset = 0;            return obj.length - offset;         }         else         {            for (int i = 0; i < value.length; i++)               value[i] = obj[i + offset];            offset += value.length;            return value.length;         }      }      catch (IndexOutOfBoundsException e)      {         throw new MessageEOFException("");      }   }