docs: public static int getInt(
          final DirectBuffer buffer, final int index, final PrimitiveType type, final ByteOrder byteOrder)
      {
          switch (type)
          {
              case INT8:
                  return buffer.getByte(index);
  
              case UINT8:
                  return (short)(buffer.getByte(index) & 0xFF);
  
              case INT16:
                  return buffer.getShort(index, byteOrder);
  
              case UINT16:
                  return buffer.getShort(index, byteOrder) & 0xFFFF;
  
              case INT32:
                  return buffer.getInt(index, byteOrder);
  
              case UINT32:
                  final int value = buffer.getInt(index, byteOrder);
                  if (value < 0)
                  {
                      throw new IllegalStateException(
                          "UINT32 type should not be greater than Integer.MAX_VALUE: value=" + value);
                  }
                  return value;
  
              default:
                  throw new IllegalArgumentException("Unsupported type: " + type);
          }
      }