
@ChannelHandler.Sharable public class Base64Encoder extends OneToOneEncoder
ChannelBuffer into a Base64-encoded ChannelBuffer.
 A typical setup for TCP/IP would be:
 ChannelPipelinepipeline = ...; // Decoders pipeline.addLast("frameDecoder", newDelimiterBasedFrameDecoder(80,Delimiters.nulDelimiter())); pipeline.addLast("base64Decoder", newBase64Decoder()); // Encoder pipeline.addLast("base64Encoder", newBase64Encoder());
ChannelHandler.Sharable| Constructor and Description | 
|---|
Base64Encoder()  | 
Base64Encoder(boolean breakLines)  | 
Base64Encoder(boolean breakLines,
             Base64Dialect dialect)  | 
| Modifier and Type | Method and Description | 
|---|---|
protected Object | 
encode(ChannelHandlerContext ctx,
      Channel channel,
      Object msg)
Transforms the specified message into another message and return the
 transformed message. 
 | 
doEncode, handleDownstreampublic Base64Encoder()
public Base64Encoder(boolean breakLines)
public Base64Encoder(boolean breakLines,
             Base64Dialect dialect)
protected Object encode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception
OneToOneEncodernull, unlike
 you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object);
 you must return something, at least ChannelBuffers.EMPTY_BUFFER.encode in class OneToOneEncoderExceptionCopyright © 2008-2014 The Netty Project. All Rights Reserved.