Examples of writeLong()


Examples of org.jboss.marshalling.Marshaller.writeLong()

            marshaller.start(createByteOutput(output));
            marshaller.writeByte(ServerManagerProtocol.PARAM_SERVER_NAME);
            marshaller.writeUTF(serverName);
            if (gracefulTimeout != null) {
                marshaller.writeByte(ServerManagerProtocol.PARAM_GRACEFUL_TIMEOUT);
                marshaller.writeLong(gracefulTimeout);
            }
            marshaller.finish();
        }

        @Override
View Full Code Here

Examples of org.jboss.netty.buffer.ChannelBuffer.writeLong()

        int b = (int) (Long.parseLong(key2.replaceAll("[^0-9]", "")) / key2.replaceAll("[^ ]", "").length());
        long c = req.getContent().readLong();
        ChannelBuffer input = ChannelBuffers.buffer(16);
        input.writeInt(a);
        input.writeInt(b);
        input.writeLong(c);
        try {
            ChannelBuffer output = ChannelBuffers.wrappedBuffer(
                    MessageDigest.getInstance("MD5").digest(input.array()));
            res.setContent(output);
        } catch (NoSuchAlgorithmException e) {
View Full Code Here

Examples of org.jboss.test.messaging.jms.message.SimpleJMSStreamMessage.writeLong()

        m.writeBytes("jboss".getBytes());
        m.writeChar('c');
        m.writeDouble(1.0D);
        m.writeFloat(2.0F);
        m.writeInt(3);
        m.writeLong(4L);
        m.writeObject("object");
        m.writeShort((short)5);
        m.writeString("stringvalue");

        return m;
View Full Code Here

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

    public void testLong() throws IOException {
        ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(1024);
        long[] numbers={Long.MIN_VALUE, -322649, -500, 0, 1, 100, 322649, Long.MAX_VALUE};
        for(long i: numbers)
            out.writeLong(i);
        ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
        for(long i: numbers) {
            long num=in.readLong();
            assert num == i;
        }
View Full Code Here

Examples of org.lealone.value.Transfer.writeLong()

        for (int i = 0, count = 0; i < transferList.size(); i++) {
            Transfer transfer = transferList.get(i);
            try {
                traceOperation("LOB_READ", (int) lobId);
                transfer.writeInt(SessionRemote.LOB_READ);
                transfer.writeLong(lobId);
                if (clientVersion >= Constants.TCP_PROTOCOL_VERSION_12) {
                    transfer.writeBytes(hmac);
                }
                transfer.writeLong(offset);
                transfer.writeInt(length);
View Full Code Here

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

        float f = random.nextFloat();
        dataOutput.writeFloat(f);
        int i = random.nextInt();
        dataOutput.writeInt(i);
        long l = random.nextLong();
        dataOutput.writeLong(l);
        short s = (short) 4;
        dataOutput.writeShort(s);
        String string = randomUnicodeString();
        dataOutput.writeUTF(string);
        dataOutput.writeVInt(Math.abs(i));
View Full Code Here

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

        float f = random.nextFloat();
        dataOutput.writeFloat(f);
        int i = random.nextInt();
        dataOutput.writeInt(i);
        long l = random.nextLong();
        dataOutput.writeLong(l);
        short s = (short) 4;
        dataOutput.writeShort(s);
        String string = randomUnicodeString();
        dataOutput.writeUTF(string);
        dataOutput.writeVInt(Math.abs(i));
View Full Code Here

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

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

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

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

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

    @Override
    public void testLong(long v) throws Exception {
  MessagePack msgpack = new MessagePack();
        Unconverter packer = new Unconverter(msgpack);
        packer.writeLong(v);
        Value r = packer.getResult();
        Converter unpacker = new Converter(msgpack, r);
        Value ret = unpacker.readValue();
        assertEquals(r, 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.