gpt4 book ai didi

io.netty.handler.codec.compression.ZlibDecoder类的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 04:05:31 27 4
gpt4 key购买 nike

本文整理了Java中io.netty.handler.codec.compression.ZlibDecoder类的一些代码示例,展示了ZlibDecoder类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZlibDecoder类的具体详情如下:
包路径:io.netty.handler.codec.compression.ZlibDecoder
类名称:ZlibDecoder

ZlibDecoder介绍

[英]Decompresses a ByteBuf using the deflate algorithm.
[中]使用deflate算法解压缩字节缓冲。

代码示例

代码示例来源:origin: netty/netty

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

代码示例来源:origin: org.jboss.errai.io.netty/netty-example

private void enableGzip(ChannelHandlerContext ctx) {
  ChannelPipeline p = ctx.getPipeline();
  p.addLast("gzipdeflater", new ZlibEncoder(ZlibWrapper.GZIP));
  p.addLast("gzipinflater", new ZlibDecoder(ZlibWrapper.GZIP));
  p.addLast("unificationB", new PortUnificationServerHandler(detectSsl, false));
  p.remove(this);
}

代码示例来源:origin: org.jboss.errai.io.netty/netty-example

@Override
  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = pipeline();

    // Enable stream compression (you can remove these two if unnecessary)
    pipeline.addLast("deflater", new ZlibEncoder(ZlibWrapper.GZIP));
    pipeline.addLast("inflater", new ZlibDecoder(ZlibWrapper.GZIP));

    // Add the number codec first,
    pipeline.addLast("decoder", new BigIntegerDecoder());
    pipeline.addLast("encoder", new NumberEncoder());

    // and then business logic.
    pipeline.addLast("handler", new FactorialClientHandler(count));

    return pipeline;
  }
}

代码示例来源:origin: redisson/redisson

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

代码示例来源:origin: org.jboss.errai.io.netty/netty-example

@Override
  public ChannelPipeline getPipeline() throws Exception {
    ChannelPipeline pipeline = pipeline();

    // Enable stream compression (you can remove these two if unnecessary)
    pipeline.addLast("deflater", new ZlibEncoder(ZlibWrapper.GZIP));
    pipeline.addLast("inflater", new ZlibDecoder(ZlibWrapper.GZIP));

    // Add the number codec first,
    pipeline.addLast("decoder", new BigIntegerDecoder());
    pipeline.addLast("encoder", new NumberEncoder());

    // and then business logic.
    // Please note we create a handler for every new channel
    // because it has stateful properties.
    pipeline.addLast("handler", new FactorialServerHandler());

    return pipeline;
  }
}

代码示例来源:origin: wildfly/wildfly

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

代码示例来源:origin: apache/activemq-artemis

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

代码示例来源:origin: io.netty/netty-codec

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

代码示例来源:origin: org.apache.activemq/artemis-jms-client-all

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

代码示例来源:origin: org.jboss.eap/wildfly-client-all

@Override
protected void handlerRemoved0(ChannelHandlerContext ctx) throws Exception {
  super.handlerRemoved0(ctx);
  if (inflater != null) {
    inflater.end();
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com