Examples of writeRawVarint32()


Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

        protobuf.clearException();
      }

      JobDataProtobuf.JobLogLine message = protobuf.build();
      int size = message.getSerializedSize();
      out.writeRawVarint32(size);
      message.writeTo(out);
    }

    out.flush();
    gzip.finish();
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

            if (verbose) {
                System.out.println("Writing message: " + i + " = " + message);
            }
            int size = message.getSerializedSize();

            cout.writeRawVarint32(size);
            message.writeTo(cout);

            watch.stop();
        }
        cout.flush();
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

                    .build();
            //.setType("type:" + i)

            System.out.println("Writing message: " + i + " = " + message);
            int size = message.getSerializedSize();
            cout.writeRawVarint32(size);
            message.writeTo(cout);
            cout.flush();
        }
        out.close();
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

            channel.getConfig().getBufferFactory().getBuffer(
                    body.order(),
                    CodedOutputStream.computeRawVarint32Size(length));
        CodedOutputStream codedOutputStream = CodedOutputStream
                .newInstance(new ChannelBufferOutputStream(header));
        codedOutputStream.writeRawVarint32(length);
        codedOutputStream.flush();
        return wrappedBuffer(header, body);
    }

}
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

      ByteBuf buf = ctx.alloc().buffer();
      OutputStream os = new ByteBufOutputStream(buf);
      CodedOutputStream cos = CodedOutputStream.newInstance(os);

      // write full length first (this is length delimited stream).
      cos.writeRawVarint32(fullLength);
     
      // write header
      cos.writeRawVarint32(HEADER_TAG);
      cos.writeRawVarint32(headerLength);
      header.writeTo(cos);
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

      // write full length first (this is length delimited stream).
      cos.writeRawVarint32(fullLength);
     
      // write header
      cos.writeRawVarint32(HEADER_TAG);
      cos.writeRawVarint32(headerLength);
      header.writeTo(cos);

      // write protobuf body length and body
      cos.writeRawVarint32(PROTOBUF_BODY_TAG);
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

      // write full length first (this is length delimited stream).
      cos.writeRawVarint32(fullLength);
     
      // write header
      cos.writeRawVarint32(HEADER_TAG);
      cos.writeRawVarint32(headerLength);
      header.writeTo(cos);

      // write protobuf body length and body
      cos.writeRawVarint32(PROTOBUF_BODY_TAG);
      cos.writeRawVarint32(protoBodyLength);
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

      cos.writeRawVarint32(HEADER_TAG);
      cos.writeRawVarint32(headerLength);
      header.writeTo(cos);

      // write protobuf body length and body
      cos.writeRawVarint32(PROTOBUF_BODY_TAG);
      cos.writeRawVarint32(protoBodyLength);
      msg.pBody.writeTo(cos);
     
      // if exists, write data body and tag.
      if(msg.getRawBodySize() > 0){
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

      cos.writeRawVarint32(headerLength);
      header.writeTo(cos);

      // write protobuf body length and body
      cos.writeRawVarint32(PROTOBUF_BODY_TAG);
      cos.writeRawVarint32(protoBodyLength);
      msg.pBody.writeTo(cos);
     
      // if exists, write data body and tag.
      if(msg.getRawBodySize() > 0){
        if(RpcConstants.EXTRA_DEBUGGING) logger.debug("Writing raw body of size {}", msg.getRawBodySize());
View Full Code Here

Examples of com.google.protobuf.CodedOutputStream.writeRawVarint32()

     
      // if exists, write data body and tag.
      if(msg.getRawBodySize() > 0){
        if(RpcConstants.EXTRA_DEBUGGING) logger.debug("Writing raw body of size {}", msg.getRawBodySize());
       
        cos.writeRawVarint32(RAW_BODY_TAG);
        cos.writeRawVarint32(rawBodyLength);
        cos.flush(); // need to flush so that dbody goes after if cos is caching.
       
        CompositeByteBuf cbb = new CompositeByteBuf(buf.alloc(), true, msg.dBodies.length + 1);
        cbb.addComponent(buf);
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.