void writeTable(String name) {
        PrintStream output;
        output = null;
        try {
            String sep;
            sep = "";
            output = new PrintStream(name + ".db");
            String header = "";
            String[] head = _columnTitles;
            for (int i = 0; i < head.length; i++) {
                if (i == head.length - 1) {
                    header += head[i];
                } else {
                    header += head[i] + ",";
                }
            }
            output.append(header);
            Iterator<Row> myiter = iterator();
            while (myiter.hasNext()) {
                output.println();
                Row row = myiter.next();
                sep = "";
                for (int i = 0; i < row.size(); i++) {
                    if (i == row.size() - 1) {
                        sep += row.get(i);
                    } else {
                        sep += row.get(i) + ",";
                    }
                }
                output.append(sep);
            }
        } catch (IOException e) {
            throw error("trouble writing to %s.db", name);
        } finally {
            if (output != null) {
                output.close();
            }
        }
    }