Package com.google.protobuf

Examples of com.google.protobuf.ByteString$ByteIterator


        Array data = Array.factory(dt, new int[] {lenp});
        for (int i=0; i<lenp; i++) data.setObject(i, attp.getSdata(i));
        return new Attribute(attp.getName(), data);
      }
    } else {
      ByteString bs = attp.getData();
      ByteBuffer bb = ByteBuffer.wrap(bs.toByteArray());
      return new Attribute(attp.getName(), Array.factory(decodeAttributeType(attp.getType()), null, bb));
    }
  }
View Full Code Here


    @Override
    public Catcher.LogMessageResponse log(RpcController controller, Catcher.LogMessage request) throws ServiceException {
        try {
            String topic = request.getTopic();
            ByteString payload = request.getPayload();
            logger.write(topic, payload);
            recorder.message(topic);
            return Catcher.LogMessageResponse.newBuilder()
                    .setServerId(serverId)
                    .setSuccessful(true)
View Full Code Here

    @Override
    public Catcher.LogMessageResponse log(RpcController controller,
            Catcher.LogMessage request) throws ServiceException {

        String topic = request.getTopic();
        ByteString payload = request.getPayload();

        Catcher.LogMessageResponse.Builder r = Catcher.LogMessageResponse
                .newBuilder().setServerId(serverId).setSuccessful(true);

        ClusterState.Target directTo = state.directTo(topic);
View Full Code Here

         *
         * @return computed result
         */
        @Override
        public LogResponse call() throws IOException {
            ByteString payload = getProto().getPayload();
            String topic = getProto().getTopic();
            logger.write(topic, payload);
            return new LogResponse(
                    Catcher.LogMessageResponse.newBuilder()
                            .setServerId(serverId)
View Full Code Here

    @Override
    public Object[] getGroup() {
       long ts300=(this.ts/300)*300000;
       Date d= new Date(ts300);
      
       ByteString agent=pvlog.getUserAgent();

       String channel = String.valueOf(agent==null?"":agent.toStringUtf8()).toLowerCase();
        if (channel.indexOf("android") >= 0) {
          channel = "android";
        } else if (channel.indexOf("iphone") >= 0||channel.indexOf("ios") >= 0) {
          channel = "ios";
        } else {
View Full Code Here

    @Override
    public Object[] getGroup() {
       long ts300=(this.ts/300)*300000;
       Date d= new Date(ts300);
      
       ByteString agent=pvlog.getUserAgent();

       String channel = String.valueOf(agent==null?"":agent.toStringUtf8()).toLowerCase();
        if (channel.indexOf("android") >= 0) {
          channel = "android";
        } else if (channel.indexOf("iphone") >= 0||channel.indexOf("ios") >= 0) {
          channel = "ios";
        } else {
View Full Code Here

    @Override
    public Object[] getGroup() {
       long ts300=(this.ts/300)*300000;
       Date d= new Date(ts300);
      
       ByteString agent=pvlog.getUserAgent();

       String channel = String.valueOf(agent==null?"":agent.toStringUtf8()).toLowerCase();
        if (channel.indexOf("android") >= 0) {
          channel = "android";
        } else if (channel.indexOf("iphone") >= 0||channel.indexOf("ios") >= 0) {
          channel = "ios";
        } else {
View Full Code Here

    Ct.SignedEntry.Builder signedEntryBuilder = Ct.SignedEntry.newBuilder();
    if (entryType == Ct.LogEntryType.X509_ENTRY_VALUE) {

      int length = (int) readNumber(in, 3);
      ByteString x509 = ByteString.copyFrom(readFixedLength(in, length));
      signedEntryBuilder.setX509(x509);

    } else if (entryType == Ct.LogEntryType.PRECERT_ENTRY_VALUE) {
      Ct.PreCert.Builder preCertBuilder = Ct.PreCert.newBuilder();
View Full Code Here

    headerBuilder.setMethodName("foo");

    GetRequest.Builder getRequestBuilder = GetRequest.newBuilder();
    RegionSpecifier.Builder regionSpecifierBuilder = RegionSpecifier.newBuilder();
    regionSpecifierBuilder.setType(RegionSpecifierType.REGION_NAME);
    ByteString name = ByteString.copyFrom(HRegionInfo.FIRST_META_REGIONINFO.getRegionName());
    regionSpecifierBuilder.setValue(name);
    RegionSpecifier regionSpecifier = regionSpecifierBuilder.build();
    getRequestBuilder.setRegion(regionSpecifier);
    Get.Builder getBuilder = Get.newBuilder();
    getBuilder.setRow(ByteString.copyFrom("somerow".getBytes()));
View Full Code Here

      uuidBuilder.setMostSigBits(clusterId.getMostSignificantBits());
      builder.addClusterIds(uuidBuilder.build());
    }
    if (scopes != null) {
      for (Map.Entry<byte[], Integer> e : scopes.entrySet()) {
        ByteString family = (compressionContext == null) ? ByteString.copyFrom(e.getKey())
            : compressor.compress(e.getKey(), compressionContext.familyDict);
        builder.addScopes(FamilyScope.newBuilder()
            .setFamily(family).setScopeType(ScopeType.valueOf(e.getValue())));
      }
    }
View Full Code Here

TOP

Related Classes of com.google.protobuf.ByteString$ByteIterator

Copyright © 2018 www.massapicom. 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.