// name here. tableEntry = new SimpleTextTable(dir, entries[i]); list.put(new Integer(i), tableEntry); } } return list; } Again, I use a Hashtable for each table (or file in our case) that is found. By now, you will have realized that I really like using Hashtables; they can grow in size dynamically and provide quick access to data. And because a Hashtable stores data as an abstract Object, I can store whatever is necessary. In this case, each Hashtable entry for a table contains a SimpleTextTable object: public class SimpleTextTable extends Object { //———————————————————————- — // Constructor //———————————————————————- — public SimpleTextTable( String dir, String file) { this.dir = dir; this.file = file; // If the filename has the .SDF extension, get rid of it if (file.endsWith(SimpleTextDefine.DATA_FILE_EXT)) { name = file.substring(0, file.length() - SimpleTextDefine.DATA_FILE_EXT.length()); } else { name = file; } } public String dir; public String file; public String name; } Notice that the constructor strips the file extension from the given file name, creating the table name. Now, back to the getTables method for DatabaseMetaData. Once a list of all of the tables has been retrieved, the Hashtable used for storing all of the rows is generated. If you were to add additional filtering, this is the place that it should be done. Finally, a new ResultSet object is created and initialized. One of the constructors for the ResultSet class accepts two Hashtables: one for the column information (SimpleTextColumn objects), and the other for row data (CommonValue objects). We ll see later how these are
The UK has been a member of the European Union since 1973. The attitude of the present government towards further integration is conservative, with the official opposition favoring a return of some powers and competencies to the UK.From our experience, we can recommend Cheap UK Web Hosting services.