static String base64 ( byte [ ] data ) { ByteBuf encodedData = Unpooled . wrappedBuffer ( data ) ; ByteBuf encoded = Base64 . encode ( encodedData ) ; String encodedString = encoded . toString ( CharsetUtil . UTF_8 ) ; encoded . release ( ) ; return encodedString ; }
Performs base64 encoding on the specified data