//
// 1. Convert message to a stream that can be decoded.
ByteBuf buf = (ByteBuf) msg;
ByteBufInputStream inputStream = new ByteBufInputStream(buf);
// 2. Get first byte: message type:
int enumValue = inputStream.readByte();
RequestType type = RequestType.values()[enumValue];
if (LOG.isDebugEnabled()) {
LOG.debug("decode: Got a response of type " + type + " from server:" +
ctx.channel().remoteAddress());
}