public abstract class HttpMessageEncoder extends OneToOneEncoder
HttpMessage
or an HttpChunk
into
a ChannelBuffer
.
ChannelHandler.Sharable
限定符 | 构造器和说明 |
---|---|
protected |
HttpMessageEncoder()
Creates a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
protected java.lang.Object |
encode(ChannelHandlerContext ctx,
Channel channel,
java.lang.Object msg)
Transforms the specified message into another message and return the
transformed message.
|
protected static void |
encodeAscii(java.lang.String s,
ChannelBuffer buf) |
protected abstract void |
encodeInitialLine(ChannelBuffer buf,
HttpMessage message) |
doEncode, handleDownstream
protected java.lang.Object encode(ChannelHandlerContext ctx, Channel channel, java.lang.Object msg) throws java.lang.Exception
OneToOneEncoder
null
, unlike
you can in OneToOneDecoder.decode(ChannelHandlerContext, Channel, Object)
;
you must return something, at least ChannelBuffers.EMPTY_BUFFER
.encode
在类中 OneToOneEncoder
java.lang.Exception
protected static void encodeAscii(java.lang.String s, ChannelBuffer buf)
protected abstract void encodeInitialLine(ChannelBuffer buf, HttpMessage message) throws java.lang.Exception
java.lang.Exception