Apache.NMS.ActiveMQ.Commands.ActiveMQBytesMessage.ClearBody C# (CSharp) Method

ClearBody() public method

public ClearBody ( ) : void
return void
        public override void ClearBody()
        {
            base.ClearBody();
            this.outputBuffer = null;
            this.dataIn = null;
            this.dataOut = null;
            this.length = 0;
        }

Usage Example

 public void TestClearBody()
 {
     ActiveMQBytesMessage bytesMessage = new ActiveMQBytesMessage();
     try {
         bytesMessage.WriteInt32(1);
         bytesMessage.ClearBody();
         Assert.IsFalse(bytesMessage.ReadOnlyBody);
         bytesMessage.WriteInt32(1);
         bytesMessage.ReadInt32();
     }
     catch(MessageNotReadableException)
     {
     }
     catch(MessageNotWriteableException)
     {
         Assert.IsTrue(false);
     }
 }
All Usage Examples Of Apache.NMS.ActiveMQ.Commands.ActiveMQBytesMessage::ClearBody