code: @SuppressWarnings("unchecked")
  	public <T extends Value> T getField(int fieldNum, T target) {
  		// range check
  		if (fieldNum < 0 || fieldNum >= this.numFields) {
  			throw new IndexOutOfBoundsException();
  		}
  		if (target == null) {
  			throw new NullPointerException("The target object may not be null");
  		}
  		
  		// get offset and check for null
  		final int offset = this.offsets[fieldNum];
  		if (offset == NULL_INDICATOR_OFFSET) {
  			return null;
  		}
  		else if (offset == MODIFIED_INDICATOR_OFFSET) {
  			// value that has been set is new or modified
  			// bring the binary in sync so that the deserialization gives the correct result
  			return (T) this.writeFields[fieldNum];
  		}
  		
  		final int limit = offset + this.lengths[fieldNum];
  		deserialize(target, offset, limit, fieldNum);
  		return target;
  	}
docs: Gets the field at the given position. The method tries to deserialize the fields into the given target value.
  If the fields has been changed since the last (de)serialization, or is null, them the target value is left
  unchanged and the changed value (or null) is returned.
  <p>
  In all cases, the returned value contains the correct data (or is correctly null).
  
  @param fieldNum The position of the field.
  @param target The value to deserialize the field into.
  
  @return The value with the contents of the requested field, or null, if the field is null.