try { ITableMetaData metaData = table.getTableMetaData(); StringBuffer buffer = new StringBuffer(); buffer.append(StringUtils.upperCase(metaData.getTableName())); buffer.append(":["); Column[] columns = metaData.getColumns(); int columnSize = columns.length; for (int i = 0; i < table.getRowCount(); i++) { buffer.append('{'); for (int j = 0; j < columnSize; j++) { if (j > 0) { buffer.append(", "); } String columnName = columns[j].getColumnName(); buffer.append(StringUtils.upperCase(columnName)); buffer.append('='); buffer.append(table.getValue(i, columnName)); } buffer.append('}'); } buffer.append(']'); return buffer.toString(); } catch (DataSetException e) { throw new RuntimeException(e); }