示例#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);
        }
示例#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);
        }
示例#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;
 }