Examples of toByteArray()


Examples of com.google.appengine.api.xmpp.XMPPServicePb.XmppInviteRequest.toByteArray()

      request.setFromJid(fromJid.getId());
    }

    byte[] responseBytes;
    try {
      responseBytes = ApiProxy.makeSyncCall(PACKAGE, "SendInvite", request.toByteArray());
    } catch (ApiProxy.ApplicationException ex) {
      switch (XmppServiceError.ErrorCode.valueOf(ex.getApplicationError())) {
        case INVALID_JID:
          throw new IllegalArgumentException("Invalid jabber ID: " + jabberId);
        case UNSPECIFIED_ERROR:
View Full Code Here

Examples of com.google.appengine.api.xmpp.XMPPServicePb.XmppSendPresenceRequest.toByteArray()

      request.setFromJid(fromJid.getId());
    }

    byte[] responseBytes;
    try {
      responseBytes = ApiProxy.makeSyncCall(PACKAGE, "SendPresence", request.toByteArray());
    } catch (ApiProxy.ApplicationException ex) {
      switch (XmppServiceError.ErrorCode.valueOf(ex.getApplicationError())) {
        case INVALID_JID:
          throw new IllegalArgumentException("Invalid jabber ID: " + jabberId);
        case INVALID_SHOW:
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.GetResponse.toByteArray()

          continue;
        }
        responsePb.addEntity(entity);
      }
      log.debug("all data was retrieved from memcache. finish.");
      return Pair.response(responsePb.toByteArray());
    }

    // MemcacheにないものだけPbを再構成して投げる
    for (int i = theRequestKeys.size() - 1; 0 <= i; i--) {
      if (theData.containsKey(theRequestKeys.get(i))) {
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.GetSchemaRequest.toByteArray()

                "This method does not work on production server.");
        }
        GetSchemaRequest req = new GetSchemaRequest();
        req.setApp(ApiProxy.getCurrentEnvironment().getAppId());
        byte[] resBuf =
            ApiProxy.makeSyncCall(DATASTORE_SERVICE, GET_SCHEMA_METHOD, req
                .toByteArray());
        Schema schema = new Schema();
        schema.mergeFrom(resBuf);
        return schema;
    }
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.PutRequest.toByteArray()

        Future<byte[]> future =
            delegate.makeAsyncCall(
                env,
                AppEngineTester.DATASTORE_SERVICE,
                AppEngineTester.PUT_METHOD,
                reqPb.toByteArray(),
                new ApiConfig());
        future.get();
        assertThat(tester.count("Hoge"), is(1));
        tester.tearDown();
        ApiProxy.setDelegate(AppEngineTester.apiProxyLocalImpl);
View Full Code Here

Examples of com.google.apphosting.api.DatastorePb.QueryResult.toByteArray()

    final MemcacheService memcache = MemvacheDelegate.getMemcache();
    String memcacheKey = MemcacheKeyUtil.createQueryKey(memcache, requestPb);

    QueryResult response = (QueryResult) memcache.get(memcacheKey);
    if (response != null) {
      return Pair.response(response.toByteArray());
    } else {
      return Pair.request(requestPb.toByteArray());
    }
  }
View Full Code Here

Examples of com.google.apphosting.api.logservice.LogServicePb.LogReadRequest.toByteArray()

    final LogQuery finalizedQuery = query;
    ApiProxy.ApiConfig apiConfig = new ApiProxy.ApiConfig();

    Future<byte[]> responseBytes = ApiProxy.makeAsyncCall(PACKAGE,
      READ_RPC_NAME, request.toByteArray(), apiConfig);
    return new FutureWrapper<byte[], LogQueryResult>(responseBytes) {
      @Override
      protected LogQueryResult wrap(byte[] responseBytes) {
        LogReadResponse response = new LogReadResponse();
        response.mergeFrom(responseBytes);
View Full Code Here

Examples of com.google.code.or.io.util.XSerializer.toByteArray()

   */
  public byte[] getPacketBody() throws IOException {
    final XSerializer ps = new XSerializer();
    ps.writeInt(this.command, 1);
    ps.writeFixedLengthString(this.databaseName);
    return ps.toByteArray();
  }
 
  /**
   *
   */
 
View Full Code Here

Examples of com.google.common.io.ByteArrayDataOutput.toByteArray()

                }

                output.write(data, 0, bytes.length - (SIZE_PER_BUCKET - bucketOffset));
            }

            System.arraycopy(output.toByteArray(), 0, bytes, 0, bytes.length);
        } catch (ExecutionException | InterruptedException exc) {
            throw new IOException(exc);
        }
    }
View Full Code Here

Examples of com.google.gdt.eclipse.designer.hosted.classloader.GWTDesignTimeVisitor.toByteArray()

          && !className.startsWith("com.extjs.")
          && !className.startsWith("com.smartgwt.")) {
        org.objectweb.asm.ClassReader classReader = new org.objectweb.asm.ClassReader(classBytes);
        GWTDesignTimeVisitor rewriter = new GWTDesignTimeVisitor();
        classReader.accept(rewriter, 0);
        classBytes = rewriter.toByteArray();
      }
      // Force class version later
      // http://fogbugz.instantiations.com/fogbugz/default.php?40575
      {
    if (Double.parseDouble(System.getProperty("java.class.version")) < org.objectweb.asm.Opcodes.V1_6) {
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.