Package io.netty.buffer

Examples of io.netty.buffer.ByteBufInputStream.readByte()


    //
    // 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());
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.