code: private String getRowLineBuf(int colCount, List<Integer> colMaxLenList, String[][] data) {
  
      StringBuilder rowBuilder = new StringBuilder();
      int colWidth = 0;
  
      for (int i = 0; i < colCount; i++) {
  
        colWidth = colMaxLenList.get(i) + 3;
  
        for (int j = 0; j < colWidth; j++) {
          if (j == 0) {
            rowBuilder.append("+");
          } else if ((i + 1 == colCount && j + 1 == colWidth)) {//for last column close the border
            rowBuilder.append("-+");
          } else {
            rowBuilder.append("-");
          }
        }
      }
  
      return rowBuilder.append("\n").toString();
    }
docs: Each string item rendering requires the border and a space on both sides.
  <p/>
  12   3   12      3  12    34
  +-----   +--------  +------+
  abc      venkat     last
  
  @param colCount
  @param colMaxLenList
  @param data
  @return