Example usage for io.netty.handler.codec.base64 Base64 encode

List of usage examples for io.netty.handler.codec.base64 Base64 encode

Introduction

In this page you can find the example usage for io.netty.handler.codec.base64 Base64 encode.

Prototype

public static ByteBuf encode(ByteBuf src, int off, int len) 

Source Link

Usage

From source file:ratpack.session.clientside.internal.ClientSideSessionStore.java

License:Apache License

private String toBase64(ByteBuf byteBuf) {
    ByteBuf encoded = Base64.encode(byteBuf, false, Base64Dialect.STANDARD);
    try {//from ww w. j av  a 2 s.  c  o m
        return encoded.toString(CharsetUtil.ISO_8859_1);
    } finally {
        encoded.release();
    }
}