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

ReadByte() public method

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

Usage Example

	    public void TestReadByte()
		{
	        ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
            msg.WriteByte( (byte)2 );
            msg.Reset();
            Assert.IsTrue( msg.ReadByte() == 2 );
	    }
All Usage Examples Of Apache.NMS.ActiveMQ.Commands.ActiveMQBytesMessage::ReadByte