Example usage for io.netty.buffer UnpooledUnsafeDirectByteBuf toString

List of usage examples for io.netty.buffer UnpooledUnsafeDirectByteBuf toString

Introduction

In this page you can find the example usage for io.netty.buffer UnpooledUnsafeDirectByteBuf toString.

Prototype

@Override
    public String toString(Charset charset) 

Source Link

Usage

From source file:org.kobeyoung81.socksproxy.DirectClientHandler.java

License:Apache License

@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {
    ctx.fireChannelRead(msg);//from w  w  w  .  ja  v a  2s .c om
    UnpooledUnsafeDirectByteBuf buffer = (UnpooledUnsafeDirectByteBuf) msg;
    System.out.println("Content:" + " <<< " + buffer.toString(Charset.defaultCharset()));
}