Origin
I finally finished the Java source code read and written in the DBF file, welcome to use
Modify the following code
private void init (InputStream inputstream) throws JDBFException {try {stream = new DataInputStream (inputstream); int i = readHeader (); fields = new JDBField [i]; int j = 1; for (int k = 0; k
IF (stream.read () <1) Throw new jdbfexception ("underected = new byte [j]; try {//stream.readfully(NextRecord); stream.read (New Byte 263]); stream.readFully (nextRecord);} catch (EOFException eofexception) {nextRecord = null; stream.close ();}} catch (IOException ioexception) {throw new JDBFException (ioexception);}}
private int readHeader () throws IOException, JDBFException {byte abyte0 [] = new byte [16]; try {stream.readFully (abyte0);} catch (EOFException eofexception) {throw new JDBFException ( "Unexpected end of file reached.") INT i = abyte0 [8]; if (i <0) i = 256; i = 256 * Abyte0 [9]; i - = 264; i = --i / 32; // i = - I / 32; // i-; try {stream.readfully (abyte0);} catch ("undexception eofexception1) {throw new jdbfexception (" undexpected end reached. ");} return i;} DBF file definition format: http://www.clicketyclick.dk/databases/xbase/format/dbf.html