code: public DecodingState decode(IoBuffer in, ProtocolDecoderOutput out)
              throws Exception {
          while (in.hasRemaining()) {
              switch (counter) {
              case 0:
                  firstByte = in.getUnsigned();
                  break;
              case 1:
                  secondByte = in.getUnsigned();
                  break;
              case 2:
                  thirdByte = in.getUnsigned();
                  break;
              case 3:
                  counter = 0;
                  return finishDecode(
                          (firstByte << 24) | (secondByte << 16) | (thirdByte << 8) | in.getUnsigned(),
                          out);
              default:
                  throw new InternalError();
              }
              counter ++;
          }
  
          return this;
      }
docs: {@inheritDoc}