public void addRecordArray(Object[] aobj) throws JDBFException {
        if (aobj.length != fields.length)
            throw new JDBFException("Error adding record: Wrong number of values. Expected " +
                                    fields.length + ", got " + aobj.length +
                                    ".");

        int i = 0;

        for (int j = 0; j < fields.length; j++)
            i += fields[j].getLength();

        byte[] abyte0 = new byte[i];
        int k = 0;

        for (int l = 0; l < fields.length; l++) {
            String s = fields[l].format(aobj[l]);
            byte[] abyte1 = null;

            if (dbfConfig.getDBFEncoding() != null)
                try {
                abyte1 = s.getBytes(dbfConfig.getDBFEncoding().name());
            } catch (UnsupportedEncodingException ex) {
            }
            else
                abyte1 = s.getBytes();

            for (int i1 = 0; i1 < fields[l].getLength(); i1++)
                abyte0[k + i1] = abyte1[i1];

            k += fields[l].getLength();
        }

        try {
            stream.write(32);
            stream.write(abyte0, 0, abyte0.length);
        } catch (IOException ioexception) {
            throw new JDBFException(ioexception);
        }

    }