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

WriteInt32() public method

public WriteInt32 ( int value ) : void
value int
return void
        public void WriteInt32( int value )
        {
            InitializeWriting();
            try
            {
                dataOut.Write( value );
            }
            catch(Exception e)
            {
                throw NMSExceptionSupport.Create(e);
            }
        }

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::WriteInt32