Apache.NMS.ActiveMQ.Commands.ActiveMQStreamMessage.InitializeWriting C# (CSharp) Method

InitializeWriting() private method

private InitializeWriting ( ) : void
return void
        private void InitializeWriting()
        {
            FailIfReadOnlyBody();
            if(this.dataOut == null)
            {
                this.byteBuffer = new MemoryStream();
                Stream target = this.byteBuffer;

                if(this.Connection != null && this.Connection.UseCompression)
                {
                    target = this.Connection.CompressionPolicy.CreateCompressionStream(target);
                    this.Compressed = true;
                }

                this.dataOut = new EndianBinaryWriter(target);
            }
        }