Package io.netty.buffer

Examples of io.netty.buffer.SwappedByteBuf


    dch.precision = bigDecimal.precision();
    dch.setSign(bigDecimal.signum() == -1);
    dch.start = 0;

    dch.buffer = Unpooled.wrappedBuffer(new byte[5 * DecimalUtility.integerSize]);
    dch.buffer = new SwappedByteBuf(dch.buffer);
    DecimalUtility.getSparseFromBigDecimal(bigDecimal, dch.buffer, dch.start, dch.scale, dch.precision, dch.nDecimalDigits);

    return dch;
  }
View Full Code Here


      dch.setSign(bigDecimal.signum() == -1);
      dch.start = 0;


      dch.buffer = Unpooled.wrappedBuffer(new byte[dch.maxPrecision * DecimalUtility.integerSize]);
      dch.buffer = new SwappedByteBuf(dch.buffer);
      DecimalUtility.getSparseFromBigDecimal(bigDecimal, dch.buffer, dch.start, dch.scale, dch.precision, dch.nDecimalDigits);

      return dch;
  }
View Full Code Here

        EMPTY_BUFFER.terminate();
    }

    ReplayingDecoderBuffer(ByteBuf buffer) {
        this.buffer = buffer;
        swapped = new SwappedByteBuf(this);
    }
View Full Code Here

        }
        if (endianness == order()) {
            return this;
        }

        SwappedByteBuf swapped = this.swapped;
        if (swapped == null) {
            this.swapped = swapped = new SwappedByteBuf(this);
        }
        return swapped;
    }
View Full Code Here

    private ByteBuf swappedByteBuf;
    private ByteBuf unsafeSwappedByteBuf;

    @Setup
    public void setup() {
        swappedByteBuf = new SwappedByteBuf(Unpooled.directBuffer(8));
        unsafeSwappedByteBuf = Unpooled.directBuffer(8).order(ByteOrder.LITTLE_ENDIAN);
        if (unsafeSwappedByteBuf.getClass().equals(SwappedByteBuf.class)) {
            throw new IllegalStateException("Should not use " + SwappedByteBuf.class.getSimpleName());
        }
    }
View Full Code Here

TOP

Related Classes of io.netty.buffer.SwappedByteBuf

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.