Examples of encode()


Examples of com.alibaba.rocketmq.common.protocol.header.GetConsumerListByGroupResponseBody.encode()

        if (consumerGroupInfo != null) {
            List<String> clientIds = consumerGroupInfo.getAllClientId();
            if (!clientIds.isEmpty()) {
                GetConsumerListByGroupResponseBody body = new GetConsumerListByGroupResponseBody();
                body.setConsumerIdList(clientIds);
                response.setBody(body.encode());
                response.setCode(ResponseCode.SUCCESS);
                response.setRemark(null);
                return response;
            }
            else {

Examples of com.alibaba.rocketmq.common.protocol.route.TopicRouteData.encode()

            String orderTopicConf =
                    this.namesrvController.getKvConfigManager().getKVConfig(
                        NamesrvUtil.NAMESPACE_ORDER_TOPIC_CONFIG, requestHeader.getTopic());
            topicRouteData.setOrderTopicConf(orderTopicConf);

            byte[] content = topicRouteData.encode();
            response.setBody(content);
            response.setCode(ResponseCode.SUCCESS);
            response.setRemark(null);
            return response;
        }

Examples of com.apitrary.orm.core.codec.Codec.encode()

        Class<? extends Codec> codecClazz = ClassUtil.getFieldAnnotationValue("value", field, com.apitrary.orm.core.annotations.Codec.class, Class.class);
        Codec codec = (Codec) ClassUtil.newInstance(codecClazz);

        Object value = ClassUtil.getValueOfField(field, entity);
        String stringValue = codec.encode(value);
        json = addNode(json, field.getName(), stringValue);
      }

      /*
       * Perform entity refs

Examples of com.auth0.jwt.JwtSigner.encode()

      payload = new  ObjectMapper().writeValueAsString(object);

        ClaimSet claimSet = new ClaimSet();
        claimSet.setExp(expiration); // expire in 1 year
       
        token = jwtSigner.encode(Algorithm.HS256, payload, "payload", new String(Base64.decodeBase64(clientSecret)), claimSet);
   
    } catch (JsonProcessingException e) {
      throw new Auth0RuntimeException(e);
    } catch (Exception e) {
      throw new Auth0RuntimeException(e);

Examples of com.bansheeproject.xmlbuilder.Parser.encode()

    simple.setSimpleStringContent("simpleStringContent");
    fieldMapComplex.setContent(simple);
   
   
    Parser parser =new Parser();
    String xml = parser.encode(fieldMapComplex);
   
   
    GregorianCalendar gregorianCalendar = (GregorianCalendar)GregorianCalendar.getInstance();
    gregorianCalendar.setTime(date);
    XMLGregorianCalendar xmlGregorianCalendar = DatatypeFactory.newInstance().newXMLGregorianCalendar(gregorianCalendar);

Examples of com.caucho.quercus.env.SessionArrayValue.encode()

    _sessions.put(session.getId(), copy);
   
    session.finish();

    if (_persistentStore != null) {
      _persistentStore.put(session.getId(), copy.encode(env));
    }
  }

  /**
   * Creates a session.  It's already been established that the

Examples of com.caucho.quercus.lib.i18n.Utf8Encoder.encode()

  static StringValue toUtf8(Env env, StringValue source)
  {
    Utf8Encoder encoder = new Utf8Encoder();
   
    return encoder.encode(env, source);
  }
 
  public String toString()
  {
    return getClass().getSimpleName() + "[" + _pattern + "]";

Examples of com.cloud.server.auth.SHA256SaltedUserAuthenticator.encode()

      authenticator.configure("SHA256", Collections.<String,Object>emptyMap());
    } catch (ConfigurationException e) {
      fail(e.toString());
    }
   
    String encodedPassword = authenticator.encode("password");
       
    String storedPassword[] = encodedPassword.split(":");
        assertEquals ("hash must consist of two components", storedPassword.length, 2);

        byte salt[] = Base64.decode(storedPassword[0]);

Examples of com.cloud.server.auth.UserAuthenticator.encode()

        if (password != null) {
            String encodedPassword = null;
            for (Iterator<UserAuthenticator> en = _userPasswordEncoders.iterator(); en.hasNext();) {
                UserAuthenticator authenticator = en.next();
                encodedPassword = authenticator.encode(password);
                if (encodedPassword != null) {
                    break;
                }
            }
            if (encodedPassword == null) {

Examples of com.dianping.cat.message.spi.MessageCodec.encode()

  @Test
  public void testCodePerformance() throws Exception {
    MessageCodec codec = lookup(MessageCodec.class, ID);
    MessageTree tree = buildMessage();
    ChannelBuffer buf = new DynamicChannelBuffer(10240);
    codec.encode(tree, buf);

    int count = 5000000;
    for (int i = 0; i < count; i++) {

      buf.markReaderIndex();
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.