Example #1
0
        public IByteBuffer WithOrder(ByteOrder order)
        {
            if (order == this.Order)
            {
                return(this);
            }
            SwappedByteBuffer swappedBuf = this.swappedByteBuffer;

            if (swappedBuf == null)
            {
                this.swappedByteBuffer = swappedBuf = this.NewSwappedByteBuffer();
            }
            return(swappedBuf);
        }
Example #2
0
        public override IByteBuffer WithOrder(ByteOrder endianness)
        {
            if (this.Order == endianness)
            {
                return(this);
            }

            SwappedByteBuffer buffer = this.swappedBuffer;

            if (buffer != null)
            {
                return(this.swappedBuffer);
            }

            buffer             = new SwappedByteBuffer(this);
            this.swappedBuffer = buffer;

            return(this.swappedBuffer);
        }
Example #3
0
 public IByteBuffer WithOrder(ByteOrder order)
 {
     if (order == this.Order)
     {
         return this;
     }
     SwappedByteBuffer swappedBuf = this.swappedByteBuffer;
     if (swappedBuf == null)
     {
         this.swappedByteBuffer = swappedBuf = this.NewSwappedByteBuffer();
     }
     return swappedBuf;
 }