code: protected static void printDataSet(DataSet dataSet) {
          final String SPACER = "| \t |";
  
          if (dataSet == null) System.out.println("DataSet is null");
          if (dataSet.getRowCount() == 0) System.out.println("DataSet is empty");
  
          List<DataColumn> dataSetColumns = dataSet.getColumns();
          int colColunt = dataSetColumns.size();
          int rowCount = dataSet.getRowCount();
  
          System.out.println("********************************************************************************************************************************************************");
          for (int row = 0; row < rowCount; row++) {
              System.out.print(SPACER);
              for (int col= 0; col< colColunt; col++) {
                  Object value = dataSet.getValueAt(row, col);
                  String colId = dataSet.getColumnByIndex(col).getId();
                  System.out.print(colId + ": " +  value);
                  System.out.print(SPACER);
              }
              System.out.println("");
          }
          System.out.println("********************************************************************************************************************************************************");
      }
docs: Helper method to print to standard output the dataset values.