code: public void setIntVec(IntBuffer data)
      {
          if (data == null)
          {
              throw new IllegalArgumentException("Input buffer for indices cannot be null");
          }
          if (getIndexSize() != 4)
          {
              throw new UnsupportedOperationException("Cannot update integer indices with short array");
          }
          if (data.isDirect())
          {
              if (!NativeIndexBuffer.setIntVec(getNative(), data))
              {
                  throw new UnsupportedOperationException("Input array is wrong size");
              }
          }
          else if (data.hasArray())
          {
              if (!NativeIndexBuffer.setIntArray(getNative(), data.array()))
              {
                  throw new IllegalArgumentException("Data array incompatible with index buffer");
              }
          }
          else
          {
              throw new UnsupportedOperationException("IntBuffer type not supported. Must be direct or have backing array");
          }
      }
docs: Updates the indices in the index buffer from a Java IntBuffer.
  All of the entries of the input int buffer are copied into
  the storage for the index buffer. The new indices must be the
  same size as the old indices - the index buffer size cannot be changed.
  @param data char array containing the new values
  @throws IllegalArgumentException if int buffer is wrong size