Examples of encode()


Examples of com.dianping.cat.message.spi.codec.PlainTextMessageCodec.encode()

    MessageTree tree = buildMessages();

    PlainTextMessageCodec codec = new PlainTextMessageCodec();
    ChannelBuffer buf = ChannelBuffers.dynamicBuffer(8192);

    codec.encode(tree, buf);

    buf.readInt();
    MessageTree tree2 = new DefaultMessageTree();
    codec.decode(buf, tree2);

Examples of com.dianping.cat.message.spi.codec.PlainTextMessageCodec1.encode()

  public void testManyOld() throws InterruptedException {
    MessageTree tree = buildMessages();
    PlainTextMessageCodec1 codec = new PlainTextMessageCodec1();
    ChannelBuffer buf = ChannelBuffers.dynamicBuffer(8192);

    codec.encode(tree, buf);

    buf.readInt();
    buf.markReaderIndex();

    long current = System.currentTimeMillis();

Examples of com.dotcms.repackage.net.jmge.gif.Gif89Encoder.encode()

  public static void encodeGIF(BufferedImage image, OutputStream out)
    throws IOException {

    Gif89Encoder encoder = new Gif89Encoder(image);

    encoder.encode(out);
  }

  public static void encodeWBMP(BufferedImage image, OutputStream out)
    throws InterruptedException, IOException {

Examples of com.dotmarketing.util.URLEncoder.encode()

          values.add(vals);
          if(!parameterName.equals("dispatch") && !parameterName.equals("captcha") && !parameterName.equals("options") && !parameterName.equals("structure") && !parameterName.equals("userId") && !parameterName.equals("referrer")){
            if(!SubmitContentUtil.imageOrFileParam(st, parameterName) && !UtilMethods.isImage(parameterName)){
              for(String val : vals){
                if(val.length() < 512) {
                  paramsBuff.append("&").append(parameterName).append("=").append(encoder.encode(val));
                }
              }
            }
          }
        }

Examples of com.ericsson.otp.erlang.OtpErlangList.encode()

        final OtpOutputStream out = new OtpOutputStream();
        ss.encode(out);
        final byte[] contents1 = out.toByteArray();
        out.reset();
        final OtpErlangList s = (OtpErlangList) termParser.parse("[3,4]");
        s.encode(out);
        final byte[] contents2 = out.toByteArray();
        out.close();

        Assert.assertEquals(contents2.length, contents1.length);
        for (int i = 0; i < contents1.length; i++) {

Examples of com.ericsson.otp.erlang.OtpErlangObject.encode()

    @Test
    public void sublist_5() throws TermParserException, IOException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3,4]");
        final OtpErlangObject ss = r.getNthTail(2);
        final OtpOutputStream out = new OtpOutputStream();
        ss.encode(out);
        final byte[] contents1 = out.toByteArray();
        out.reset();
        final OtpErlangList s = (OtpErlangList) termParser.parse("[3,4]");
        s.encode(out);
        final byte[] contents2 = out.toByteArray();

Examples of com.fasterxml.storemate.shared.util.UTF8UrlEncoder.encode()

     */

    public void testEncoding()
    {
        UTF8UrlEncoder enc = new UTF8UrlEncoder(true);
        assertEquals("This%3A+%C2%A9...", enc.encode("This: \u00A9...", false));
        assertEquals("here/then", enc.encode("here/then", false));
        assertEquals("here%2Fthen", enc.encode("here/then", true));
    }

    /*
 

Examples of com.firefly.net.Session.encode()

    StringLineClientHandler handler = new StringLineClientHandler();
    Client client = new TcpClient(new StringLineDecoder(),
        new StringLineEncoder(), handler);
        Session session = client.connect("localhost", 9900);

    session.encode("hello client");
    String ret = (String)session.getResult(1000);
    System.out.println("receive[" + ret + "]");

    session.encode("test2");
    ret = (String)session.getResult(1000);

Examples of com.floreysoft.jmte.encoder.Encoder.encode()

      return renderedResult;
    } else {
      final String prefixedRenderedResult = (prefix != null ? prefix : "") + renderedResult + (suffix != null ? suffix : "");
      Encoder encoder = context.getEncoder();
      if (!rawRendering && encoder != null) {
        final String encodedPrefixedRenderedResult = encoder.encode(prefixedRenderedResult);
        return encodedPrefixedRenderedResult;
      } else {
        return prefixedRenderedResult;
      }
    }

Examples of com.github.xgameenginee.core.ProtocolCoder.encode()

            throw new IllegalStateException("write bytes not be filled full! type = " + buffer.getChannelBuffer().getShort(2));
        }

        ProtocolCoder coder = GameBoss.getInstance().getProtocolCoder();
        if (coder != null) {
            coder.encode(buffer.getChannelBuffer().array(), GameBoss.getInstance().getWriteHeaderSize());
        }
        channel.write(buffer.getChannelBuffer());
    }

    @Override
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.