code: public void setValue(int index, byte[] value) throws IOException {
          if (index >= structure.valueSizes.size()) {
              throw new IOException("Index " + index + " is out of range.");
          }
          int length = structure.valueSizes.get(index);
          if (value.length != length) {
              throw new IOException("The length of the given value is not equal to the expected one. (" + value.length
                      + "!=" + length + ")");
          }
          Bytes.putBytes(this.value, structure.valueByteOffsets.get(index), value, 0, value.length);
      }
docs: Sets the value belonging to the given field.
  
  @param index
  the index of the requested field
  @param value
  the value to set
  @throws IOException