Package com.linuxense.javadbf

Examples of com.linuxense.javadbf.DBFReader


    writer.write(new Object[] { "004", "long word of unknow catalog fruit" });
    writer.close();
    fos.close();

    InputStream inputStream = new FileInputStream(dbfile);
    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++) {

        System.out.println(rowObjects[i]);
      }
View Full Code Here


  public void setDataFile(File file) {
    this.dataFile = file;
    if (null != dataFile) {
      try {
        dbfReader = new DBFReader(new FileInputStream(dataFile));
        dbfWriter = new DBFWriter();
      } catch (DBFException e) {
        throw new RuntimeException(e);
      } catch (FileNotFoundException e) {
        throw new RuntimeException(e);
View Full Code Here

TOP

Related Classes of com.linuxense.javadbf.DBFReader

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.