Package com.linuxense.javadbf

Examples of com.linuxense.javadbf.DBFField


  }

  public void writeTitle(String titleName, Object data) {
    Object[] attrs = (Object[]) data;
    try {
      DBFField fields[] = new DBFField[attrs.length];
      for (int i = 0; i < fields.length; i++) {
        fields[i] = new DBFField();
        fields[i].setName((String) attrs[i]);
        fields[i].setDataType(DBFField.FIELD_TYPE_C);
        // FIXME
        fields[i].setFieldLength(255);
      }
View Full Code Here


    DBFReader reader = new DBFReader(inputStream);
    reader.setCharactersetName("gbk");
    int numberOfFields = reader.getFieldCount();

    assertEquals(2, numberOfFields);
    DBFField field0 = reader.getField(0);
    assertEquals("code", field0.getName());
    DBFField field1 = reader.getField(1);
    assertEquals("name", field1.getName());
    Object[] rowObjects;
    while ((rowObjects = reader.nextRecord()) != null) {

      for (int i = 0; i < rowObjects.length; i++) {
View Full Code Here

TOP

Related Classes of com.linuxense.javadbf.DBFField

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.