@ChannelHandler.Sharable public class Base64Decoder extends OneToOneDecoder
ChannelBuffer or US-ASCII String
into a ChannelBuffer. Please note that this decoder must be used
with a proper FrameDecoder 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());
ChannelHandler.Sharable| 构造器和说明 |
|---|
Base64Decoder() |
Base64Decoder(Base64Dialect dialect) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected java.lang.Object |
decode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified received message into another message and return
the transformed message.
|
handleUpstreampublic Base64Decoder()
public Base64Decoder(Base64Dialect dialect)
protected java.lang.Object decode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneDecodernull if the received message
is supposed to be discarded.decode 在类中 OneToOneDecoderjava.lang.Exception