Package org.shiftone.jrat.util.io.csv.field

Examples of org.shiftone.jrat.util.io.csv.field.Field


    current = new String[delimitedFormat.getFieldCount()];
  }

  public void setValue(int fieldIndex, Object value) {

    Field field = delimitedFormat.getField(fieldIndex);
    current[fieldIndex] = field.format(value);
  }
View Full Code Here


  public Object getValue(int columnIndex, boolean nullable) {

    if (current == null) {
      throw new InputOutputException("current record is null");
    }
    Field field = delimitedFormat.getField(columnIndex);
    String textValue = current[columnIndex];
    Object value = field.parse(textValue);
    if ((value == null) && (!nullable)) {
      throw new InputOutputException("value is null on line " + getLineNumber() + " column " + columnIndex);
    }
    return value;
  }
View Full Code Here

TOP

Related Classes of org.shiftone.jrat.util.io.csv.field.Field

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.