Java Code Examples for io.netty.buffer.ByteBuf.readShortLE()

The following are Jave code examples for showing how to use readShortLE() of the io.netty.buffer.ByteBuf class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: JungleTree   File:   Source Code and License Vote up 5 votes
public ResourcePackResponsePacket decode(ByteBuf buf) {
    ResourcePackResponsePacket packet = new ResourcePackResponsePacket();

    String[] packs = new String[buf.readShortLE()];
    for (int i=0; i<packs.length; i++) {
        packs[i] = ByteBufUtils.readString(buf);

    return packet;