Examples of CsvWriter


Examples of org.beangle.util.csv.CsvWriter

  }

  public void write(Object obj) {
    if (null == csvr) {
      if (null == csvFormat) {
        this.csvr = new CsvWriter(new OutputStreamWriter(outputStream));
      } else {
        this.csvr = new CsvWriter(new OutputStreamWriter(outputStream), csvFormat);
      }
    }
    if (null == obj) return;
    try {
      if (obj.getClass().isArray()) {
View Full Code Here

Examples of org.molgenis.io.csv.CsvWriter

  }

  @Override
  public void export(OutputStream os) throws IOException, TableException
  {
    CsvWriter csvWriter = new CsvWriter(os);

    // save table state
    int colOffset = tupleTable.getColOffset();
    int colLimit = tupleTable.getColLimit();
    int rowOffset = tupleTable.getOffset();
    int rowLimit = tupleTable.getLimit();

    // update table state
    tupleTable.setColOffset(0);
    tupleTable.setColLimit(0);
    tupleTable.setOffset(0);
    tupleTable.setLimit(0);

    try
    {
      csvWriter.writeColNames(new FieldHeaderTuple(tupleTable.getColumns()).getColNames());
      for (Tuple row : tupleTable)
        csvWriter.write(row);
    }
    finally
    {
      IOUtils.closeQuietly(csvWriter);
View Full Code Here

Examples of org.rstudio.core.client.CsvWriter

            }
            timerIsRunning_ = !timerIsRunning_;
         }
         else if (keyCode == 'E')
         {
            CsvWriter writer = new CsvWriter();
            writer.writeValue(now_ + "");
            writer.endLine();
            for (RequestLogEntry entry : entries_)
               entry.toCsv(writer);

            TextBoxDialog dialog = new TextBoxDialog("Export",
                                                     writer.getValue(),
                                                     null);
            dialog.showModal();
         }
         else if (keyCode == 'I')
         {
View Full Code Here

Examples of org.rstudio.core.client.CsvWriter

         public void onNavigate(HelpNavigateEvent event)
         {
            if (!historyInitialized_)
               return;
           
            CsvWriter csvWriter = new CsvWriter();
            csvWriter.writeValue(getApplicationRelativeHelpUrl(event.getUrl()));
            csvWriter.writeValue(event.getTitle());
            helpHistoryList_.append(csvWriter.getValue());

         }
      }) ;
      SelectionHandler<String> navigator = new SelectionHandler<String>() {
         public void onSelection(SelectionEvent<String> event)
View Full Code Here

Examples of org.rstudio.core.client.CsvWriter

   }

   @Override
   public void writeDictionary(ArrayList<String> ignoredWords)
   {
      CsvWriter csvWriter = new CsvWriter();
      for (String ignored : ignoredWords)
         csvWriter.writeValue(ignored);
      csvWriter.endLine();
      docUpdateSentinel_.setProperty(IGNORED_WORDS,
                                     csvWriter.getValue(),
                                     new NullProgressIndicator());  
   }
View Full Code Here

Examples of org.sf.bee.commons.csv.CSVWriter

    //                      p u b l i c
    // ------------------------------------------------------------------------
    public String exportAsFile(final String filepath) throws IOException {
        final String destination = this.getFilePath(filepath);
        FileUtils.createParentDirs(filepath);
        final CSVWriter writer = new CSVFileWriter(destination);
        try {
            final List<DBObject> data = _srvc.find();
            this.export(writer, data);
        } catch (Throwable t) {
        }
        writer.close();
        return destination;
    }
View Full Code Here

Examples of org.sf.bee.commons.csv.CSVWriter

        return destination;
    }
   
    public String exportAsString() throws IOException {
        final StringWriter output = new StringWriter();
        final CSVWriter writer = new CSVWriter(output);
        try {
            final List<DBObject> data = _srvc.find();
            this.export(writer, data);
        } catch (Throwable t) {
        }
        writer.close();
        return output.toString();
    }
View Full Code Here

Examples of xbird.util.csv.CsvWriter

    }

    public ProfiledDocumentTable(File f) {
        System.err.println("Access pattern to the XMLDocumentTable is profiled to "
                + f.getAbsolutePath());
        final CsvWriter csv = new CsvWriter(f);
        csv.writeRow("page");
        this._csv = csv;
    }
View Full Code Here

Examples of xbird.util.csv.CsvWriter

    public ProfiledPersistentDocumentTable(String file, DbCollection coll, String docName, PropertyMap docProps) {
        super(coll, docName, docProps);
        File f = new File(file);
        System.err.println("Access pattern to the XMLDocumentTable is profiled to "
                + f.getAbsolutePath());
        final CsvWriter csv = new CsvWriter(f);
        csv.writeRow("page");
        this._csv = csv;
    }
View Full Code Here

Examples of xbird.util.io.CsvWriter

    protected ProfiledPersistentDocumentTable(String file, DbCollection coll, String docName, Properties docProps) {
        super(coll, docName, docProps);
        File f = new File(file);
        System.err.println("Access pattern to the XMLDocumentTable is profiled to "
                + f.getAbsolutePath());
        final CsvWriter csv = new CsvWriter(f);
        csv.writeRow("page");
        this._csv = csv;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.