Examples of writeBoolean()


Examples of org.jgroups.util.ByteArrayDataOutputStream.writeBoolean()

    public void testExpanding2() {
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(1);
        out.write(new byte[]{'b', 'e', 'l', 'a'});

        out=new ByteArrayDataOutputStream(1);
        out.writeBoolean(true);
        out.writeBoolean(false);

        out=new ByteArrayDataOutputStream(1);
        out.writeShort(22);
        out.writeShort(23);
View Full Code Here

Examples of org.lilyproject.bytes.api.DataOutput.writeBoolean()

    }

    public void testAllTypes() {
        DataOutput dataOutput = new DataOutputImpl();
        boolean b = random.nextBoolean();
        dataOutput.writeBoolean(b);
        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        dataOutput.writeByte(bytes[0]);
        dataOutput.writeBytes(bytes);
        double d = random.nextDouble();
View Full Code Here

Examples of org.lilyproject.bytes.impl.DataOutputImpl.writeBoolean()

    }

    public void testAllTypes() {
        DataOutput dataOutput = new DataOutputImpl();
        boolean b = random.nextBoolean();
        dataOutput.writeBoolean(b);
        byte[] bytes = new byte[10];
        random.nextBytes(bytes);
        dataOutput.writeByte(bytes[0]);
        dataOutput.writeBytes(bytes);
        double d = random.nextDouble();
View Full Code Here

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

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

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

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

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

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

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

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

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

    @Override
    public void testBoolean(boolean v) throws Exception {
  MessagePack msgpack = new MessagePack();
  BufferPacker packer = msgpack.createBufferPacker();
  packer.writeBoolean(v);
  byte[] bytes = packer.toByteArray();
  BufferUnpacker unpacker = msgpack.createBufferUnpacker(bytes);
  Value value = unpacker.readValue();
  assertTrue(value.isBoolean());
  boolean ret = new Converter(value).readBoolean();
View Full Code Here

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

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

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

    @Override
    public void testBoolean(boolean v) throws Exception {
  MessagePack msgpack = new JSON();
  ByteArrayOutputStream out = new ByteArrayOutputStream();
  Packer packer = msgpack.createPacker(out);
  packer.writeBoolean(v);
  byte[] bytes = out.toByteArray();
  Unpacker unpacker = msgpack.createUnpacker(new ByteArrayInputStream(bytes));
  boolean ret = unpacker.readBoolean();
  assertEquals(v, ret);
    }
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.