code: public void close() {
  
          if (csvReader != null) {
              try {
                  csvReader.close();
              } catch (IOException e) {
                  // Ignore.
              }
          }
  
          if (csvWriter != null) {
              try {
                  csvWriter.close();
              } catch (IOException e) {
                  // Ignore.
              }
          }
      }
docs: Close reader and writer objects.