Tabnine Logo
CsvMapReader.close
Code IndexAdd Tabnine to your IDE (free)

How to use
close
method
in
org.supercsv.io.CsvMapReader

Best Java code snippets using org.supercsv.io.CsvMapReader.close (Showing top 3 results out of 315)

origin: org.apache.apex/malhar-contrib

@Override
public void teardown()
{
 try {
  csvMapReader.close();
 } catch (IOException e) {
  logger.error("Error while closing csv map reader {}", e.getMessage());
  DTThrowable.wrapIfChecked(e);
 }
 try {
  csvBeanReader.close();
 } catch (IOException e) {
  logger.error("Error while closing csv bean reader {}", e.getMessage());
  DTThrowable.wrapIfChecked(e);
 }
}
origin: apache/apex-malhar

@Override
public void teardown()
{
 try {
  csvMapReader.close();
 } catch (IOException e) {
  logger.error("Error while closing csv map reader {}", e.getMessage());
  DTThrowable.wrapIfChecked(e);
 }
 try {
  csvBeanReader.close();
 } catch (IOException e) {
  logger.error("Error while closing csv bean reader {}", e.getMessage());
  DTThrowable.wrapIfChecked(e);
 }
}
origin: openscoring/openscoring

static
public TableEvaluationRequest readTable(BufferedReader reader, CsvPreference format) throws IOException {
  CsvMapReader parser = new CsvMapReader(reader, format);
  String[] header = parser.getHeader(true);
  List<String> columns = Arrays.asList(header);
  TableEvaluationRequest tableRequest = new TableEvaluationRequest()
    .setColumns(columns);
  String idColumn = tableRequest.getIdColumn();
  List<EvaluationRequest> requests = new ArrayList<>();
  while(true){
    Map<String, String> row = parser.read(header);
    if(row == null){
      break;
    }
    String id = null;
    if(idColumn != null){
      id = row.remove(idColumn);
    }
    EvaluationRequest request = new EvaluationRequest(id)
      .setArguments(row);
    requests.add(request);
  }
  tableRequest.setRequests(requests);
  parser.close();
  return tableRequest;
}
org.supercsv.ioCsvMapReaderclose

Popular methods of CsvMapReader

  • <init>
    Constructs a new CsvMapReader with the supplied (custom) Tokenizer and CSV preferences. The tokenize
  • read
  • getHeader
  • executeProcessors
  • getColumns
  • readRow

Popular in Java

  • Updating database using SQL prepared statement
  • startActivity (Activity)
  • putExtra (Intent)
  • getSupportFragmentManager (FragmentActivity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Top 12 Jupyter Notebook extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now