Examples of writeShort()


Examples of org.msgpack.packer.BufferPacker.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new JSON();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeShort(v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  short ret = unpacker.readShort();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.BufferPacker.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new JSON();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeShort(v);
  byte[] bytes = packer.toByteArray();
        Unpacker unpacker = msgpack.createBufferUnpacker(bytes);
  short ret = unpacker.readShort();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.BufferPacker.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new MessagePack();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeShort(v);
  byte[] bytes = packer.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  short ret = unpacker.readShort();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.BufferPacker.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new MessagePack();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeShort(v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker(bytes);
  short ret = unpacker.readShort();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Packer.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new JSON();
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  packer.writeShort(v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createBufferUnpacker(bytes);
  short ret = unpacker.readShort();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Packer.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new JSON();
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  packer.writeShort(v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  short ret = unpacker.readShort();
  assertEquals(v, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Unconverter.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeShort(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        Value ret = unpacker.readValue();
        assertEquals(r, ret);
    }
View Full Code Here

Examples of org.msgpack.packer.Unconverter.writeShort()

    @Override
    public void testShort(short v) throws Exception {
  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeShort(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        short ret = unpacker.readShort();
        assertEquals(v, ret);
    }
View Full Code Here

Examples of org.voltdb.messaging.FastSerializer.writeShort()

     */
    @Override
    protected void p_serializeToBuffer(ByteBuffer b) throws IOException {
        FastSerializer fs = new FastSerializer();
        try {
            fs.writeShort(this.block_id);
        } catch (IOException ex) {
            throw new RuntimeException(ex);
        }
        b.put(fs.getBuffer());
    }
View Full Code Here

Examples of streamer.ByteBuffer.writeShort()

        ByteBuffer buf = new ByteBuffer(length, true);

        // Type (high nibble) = 0xe = CR TPDU; credit (low nibble) = 0
        buf.writeByte(X224_TPDU_CONNECTION_REQUEST);

        buf.writeShort(0); // Destination reference = 0
        buf.writeShort(0); // Source reference = 0
        buf.writeByte(0); // Class and options = 0
        buf.writeString("Cookie: mstshash=" + userName + "\r\n", RdpConstants.CHARSET_8); // Cookie

        // RDP_NEG_REQ::type
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.