@ChannelHandler.Sharable public class Base64Decoder extends MessageToMessageDecoder<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>
ByteBuf or US-ASCII String
into a ByteBuf. Please note that this decoder must be used
with a proper ByteToMessageDecoder such as DelimiterBasedFrameDecoder
if you are using a stream-based transport such as TCP/IP. A typical decoder
setup for TCP/IP would be:
ChannelPipelinepipeline = ...; // Decoders pipeline.addLast("frameDecoder", newDelimiterBasedFrameDecoder(80,Delimiters.nulDelimiter())); pipeline.addLast("base64Decoder", newBase64Decoder()); // Encoder pipeline.addLast("base64Encoder", newBase64Encoder());
| Constructor and Description |
|---|
Base64Decoder() |
Base64Decoder(Base64Dialect dialect) |
| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf msg) |
inboundBufferUpdated, isDecodable, newInboundBufferafterAdd, afterRemove, beforeAdd, beforeRemove, channelActive, channelInactive, channelRegistered, channelUnregistered, exceptionCaught, userEventTriggeredclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic Base64Decoder()
public Base64Decoder(Base64Dialect dialect)
public io.netty.buffer.ByteBuf decode(io.netty.channel.ChannelHandlerContext ctx,
io.netty.buffer.ByteBuf msg)
throws Exception
decode in class MessageToMessageDecoder<io.netty.buffer.ByteBuf,io.netty.buffer.ByteBuf>ExceptionCopyright © 2008-2012 The Netty Project. All Rights Reserved.