Examples of writeVInt()


Examples of org.elasticsearch.common.io.stream.BytesStreamOutput.writeVInt()

        BytesStreamOutput out = CachedStreamOutput.popEntry().cachedBytes();
        out.writeBoolean(false);
        out.writeByte((byte) 1);
        out.writeShort((short) -1);
        out.writeInt(-1);
        out.writeVInt(2);
        out.writeLong(-3);
        out.writeVLong(4);
        out.writeFloat(1.1f);
        out.writeDouble(2.2);
        out.writeUTF("hello");
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.transport.Transport.writeVInt()

            // 1) write header
            long messageId = HotRodOperationsHelper.writeHeader(transport, REPLACE_IF_UNMODIFIED_REQUEST, cacheName, topologyId, flags);

            //2) write message body
            transport.writeArray(key);
            transport.writeVInt(lifespan);
            transport.writeVInt(maxIdle);
            transport.writeLong(version);
            transport.writeArray(value);
            return returnVersionedOperationResponse(transport, messageId, REPLACE_IF_UNMODIFIED_RESPONSE, flags);
         } catch (TransportException te) {
View Full Code Here

Examples of org.infinispan.client.hotrod.impl.transport.Transport.writeVInt()

            long messageId = HotRodOperationsHelper.writeHeader(transport, REPLACE_IF_UNMODIFIED_REQUEST, cacheName, topologyId, flags);

            //2) write message body
            transport.writeArray(key);
            transport.writeVInt(lifespan);
            transport.writeVInt(maxIdle);
            transport.writeLong(version);
            transport.writeArray(value);
            return returnVersionedOperationResponse(transport, messageId, REPLACE_IF_UNMODIFIED_RESPONSE, flags);
         } catch (TransportException te) {
            logErrorAndThrowExceptionIfNeeded(i, te);
View Full Code Here

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

        dataOutput.writeLong(l);
        short s = (short) 4;
        dataOutput.writeShort(s);
        String string = randomUnicodeString();
        dataOutput.writeUTF(string);
        dataOutput.writeVInt(Math.abs(i));
        dataOutput.writeVLong(Math.abs(l));

        byte[] data = dataOutput.toByteArray();
        DataInput dataInput = new DataInputImpl(data);
        Assert.assertEquals(b, dataInput.readBoolean());
View Full Code Here

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

        dataOutput.writeLong(l);
        short s = (short) 4;
        dataOutput.writeShort(s);
        String string = randomUnicodeString();
        dataOutput.writeUTF(string);
        dataOutput.writeVInt(Math.abs(i));
        dataOutput.writeVLong(Math.abs(l));

        byte[] data = dataOutput.toByteArray();
        DataInput dataInput = new DataInputImpl(data);
        Assert.assertEquals(b, dataInput.readBoolean());
View Full Code Here

Examples of uk.ac.ucl.panda.utility.io.IndexOutput.writeVInt()

        IndexOutput os = null;
        try {
            os = directory.createOutput(fileName);

            // Write the number of entries
            os.writeVInt(entries.size());

            // Write the directory with all offsets at 0.
            // Remember the positions of directory entries so that we can
            // adjust the offsets later
            Iterator it = entries.iterator();
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.