Examples of writePayload()


Examples of it.unimi.dsi.mg4j.index.BitStreamIndexWriter.writePayload()

        if ( indexingType == IndexingType.STANDARD ) {
          for ( int i = 0; i < documentCount; i++ ) {
            obs = indexWriter.newDocumentRecord();
            indexWriter.writeDocumentPointer( obs, i );
            payload.read( ibs );
            indexWriter.writePayload( obs, payload );
          }
        }
        else {
          // We sort position by pointed document pointer.
          LongArrays.quickSort( position, 0, documentCount, new AbstractLongComparator() {
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.BitStreamIndexWriter.writePayload()

          for ( int i = 0; i < documentCount; i++ ) {
            obs = indexWriter.newDocumentRecord();
            ibs.position( position[ i ] );
            indexWriter.writeDocumentPointer( obs, ibs.readDelta() );
            payload.read( ibs );
            indexWriter.writePayload( obs, payload );
          }

          maxDocInBatch = 0;
        }
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexWriter.writePayload()

        if ( indexingType == IndexingType.STANDARD ) {
          for ( int i = 0; i < documentCount; i++ ) {
            obs = indexWriter.newDocumentRecord();
            indexWriter.writeDocumentPointer( obs, i );
            payload.read( ibs );
            indexWriter.writePayload( obs, payload );
          }
        }
        else {
          // We sort position by pointed document pointer.
          LongArrays.quickSort( position, 0, documentCount, new AbstractLongComparator() {
View Full Code Here

Examples of it.unimi.dsi.mg4j.index.IndexWriter.writePayload()

          for ( int i = 0; i < documentCount; i++ ) {
            obs = indexWriter.newDocumentRecord();
            ibs.position( position[ i ] );
            indexWriter.writeDocumentPointer( obs, ibs.readDelta() );
            payload.read( ibs );
            indexWriter.writePayload( obs, payload );
          }

          maxDocInBatch = 0;
        }
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame.writePayload()

    {
        AMQFrame deliverFrame = BasicDeliverBody.createAMQFrame(channel.getChannelId(), consumerTag,
                                                                deliveryTag, false, exchange,
                                                                routingKey);
        ByteBuffer buf = ByteBuffer.allocate((int) deliverFrame.getSize()); // XXX: Could cast be a problem?
        deliverFrame.writePayload(buf);
        buf.flip();
        return buf;
    }
}
View Full Code Here

Examples of org.apache.qpid.framing.AMQFrame.writePayload()

        random.nextBytes(payload);
        final AMQBody body = new ContentBody(payload);
        AMQFrame frame = new AMQFrame(1, body);
        byte[] outputBuf = new byte[4096];
        BytesDataOutput dataOutput = new BytesDataOutput(outputBuf);
        frame.writePayload(dataOutput);
        for(int i = 0 ; i < dataOutput.length(); i++)
        {
            _decoder.decodeBuffer(ByteBuffer.wrap(outputBuf, i, 1));

        }
View Full Code Here

Examples of org.apache.qpid.framing.ContentHeaderBody.writePayload()

            ContentHeaderBody headerBody = mmd.getContentHeaderBody();
            final int bodySize = headerBody.getSize();
            byte[] underlying = new byte[bodySize];
            ByteBuffer buf = ByteBuffer.wrap(underlying);
            headerBody.writePayload(buf);
/*
            Blob dataAsBlob = conn.createBlob();
            dataAsBlob.setBytes(1L, underlying);
            stmt.setBlob(6, dataAsBlob);
*/
 
View Full Code Here

Examples of org.apache.qpid.framing.ContentHeaderBody.writePayload()

            ContentHeaderBody headerBody = mmd.getContentHeaderBody();
            final int bodySize = headerBody.getSize();
            byte[] underlying = new byte[bodySize];
            ByteBuffer buf = ByteBuffer.wrap(underlying);
            headerBody.writePayload(buf);
/*
            Blob dataAsBlob = conn.createBlob();
            dataAsBlob.setBytes(1L, underlying);
            stmt.setBlob(6, dataAsBlob);
*/
 
View Full Code Here

Examples of org.msgpack.core.MessagePacker.writePayload()

        bi = bi.add(BigInteger.ONE);
        packer.packBigInteger(bi);
        // #8
        byte[] bytes = new byte[]{(byte) 0xFF, (byte) 0xFE, 0x01, 0x00};
        packer.packBinaryHeader(bytes.length);
        packer.writePayload(bytes);
        // #9
        packer.packMapHeader(2);
        {
            packer.packString("child_map_name");
            packer.packString("komamitsu");
View Full Code Here

Examples of org.msgpack.core.MessagePacker.writePayload()

            messagePacker.packInt((Integer) v);
        }
        else if (v instanceof ByteBuffer) {
            ByteBuffer bb = (ByteBuffer) v;
            messagePacker.packBinaryHeader(bb.limit());
            messagePacker.writePayload(bb);
        }
        else if (v instanceof String) {
            messagePacker.packString((String) v);
        }
        else if (v instanceof Float) {
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.