class ConcatFields extends TextFileOutput implements StepInterface {

  Object[] prepareOutputRow( Object[] r ) {
    Object[] outputRowData = null;
    if ( !meta.isRemoveSelectedFields() ) {
      // reserve room for the target field
      outputRowData = RowDataUtil.resizeArray( r, data.outputRowMeta.size() );
    } else {
      // reserve room for the target field and re-map the fields
      outputRowData = new Object[ data.outputRowMeta.size() + RowDataUtil.OVER_ALLOCATE_SIZE ];
      if ( r != null ) {
        // re-map the fields
        for ( int i = 0; i < data.remainingFieldsInputOutputMapping.length; i++ ) { // BTW: the new target field is not
          // here
          outputRowData[ i ] = r[ data.remainingFieldsInputOutputMapping[ i ] ];
        }
      }
    }
    return outputRowData;
  }

  public  ConcatFields( StepMeta stepMeta, StepDataInterface stepDataInterface, int copyNr, TransMeta transMeta,
                       Trans trans );

}