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

ReadInt16() public method

public ReadInt16 ( ) : short
return short
        public short ReadInt16()
        {
            InitializeReading();
            try
            {
                return dataIn.ReadInt16();
            }
            catch(EndOfStreamException e)
            {
                throw NMSExceptionSupport.CreateMessageEOFException(e);
            }
            catch(IOException e)
            {
                throw NMSExceptionSupport.CreateMessageFormatException(e);
            }
        }

Usage Example

	    public void TestReadShort() {
	        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
            msg.WriteInt16((short) 3000);
            msg.Reset();
            Assert.IsTrue(msg.ReadInt16() == 3000);
	    }
All Usage Examples Of Apache.NMS.ActiveMQ.Commands.ActiveMQBytesMessage::ReadInt16