Write a row to the file.

@param row A row of data.
@throws java.io.IOException Thrown when there are problems writing to the
destination.
972518
@Override
    protected void writeToOutput(final Map<String, Object> row)
            throws IOException {
        if (generator == null) {
            ObjectMapper mapper = new ObjectMapper();
            BsonFactory factory = new BsonFactory(mapper);
            factory.enable(BsonGenerator.Feature.ENABLE_STREAMING);
            generator = factory.createJsonGenerator(getOutputStream());
            generator.writeStartArray(); // [
        }

        // Convert the tuple into a map
        generator.writeObject(row);
    }
621611
function writeJson( row ){
    let targetDir = path.join(dataDir, wofIdToPath(row.id).join(path.sep));
    try {
      fs.ensureDirSync(targetDir);
      fs.writeFileSync( path.join(targetDir, `${row.id}.geojson`), row.body, 'utf8' );
    } catch( error ){
      if( error ){ console.error(`error making directory ${targetDir}`); }
    }
  }
238846
public void writeTo(File file) throws IOException {
        FileChannel channel = new FileOutputStream(file).getChannel();
        try {
            writeTo(channel);
        } finally {
            channel.close();
        }
    }
1372670
public void write(String... columns) throws DataUtilException {
        if(columns.length != tableColumns) {
            throw new DataUtilException("Invalid column count. Expected " + tableColumns + " but found: "
                    + columns.length);
        }
        try {
            if(currentRow == 0) {
                // capture header row
                this.headerRowColumns = columns;
                writeTop();
                writeRow(headerRowColumns);
            } else if(maxRowsPerPage > 1 && currentRow % maxRowsPerPage == 0) {
                writeBottom(true);
                currentPageNumber = (currentRow/maxRowsPerPage) + 1;
                writeTop();
                writeRow(headerRowColumns);
                currentRow += 1;
                writeRow(columns);
            } else {
                writeRow(columns);
            }
            currentRow += 1;
        } catch (Exception e) {
            throw new DataUtilException(e);
        }
    }
455641
public void addRow(String[] data) {

        if (data.length != iColCount) {
            return;
        }

        String[] row = new String[iColCount];

        for (int i = 0; i < iColCount; i++) {
            row[i] = data[i];

            if (row[i] == null) {
                row[i] = "(null)";
            }
        }

        vData.addElement(row);

        iRowCount++;
    }
505854
@Override
	public void write(DataOutputView out) throws IOException {
		out.writeInt(position);

		for (int i = 0; i < position; i++) {
			out.writeByte(data[i]);
		}
	}
973347
public static void writeFile( List<String> lines, String filePath ) throws IOException {
        writeFile(lines, new File(filePath));
    }
1101459
public void newRow(ByteBuffer key) throws IOException
    {
        if (currentKey != null && !columnFamily.isEmpty())
            writeRow(currentKey, columnFamily);

        currentKey = DatabaseDescriptor.getPartitioner().decorateKey(key);
        columnFamily = getColumnFamily();
    }
820122
@Override
    public void write(DataOutput out) throws IOException {
        if (record != null) record.write(out);
    }
1228935
private void writeCell(Row row, int col, Object value, CellStyle style) {
		Cell cell = row.createCell(col);
		cell.setCellValue(value != null ? value.toString() : "");
		cell.setCellStyle(style);
	}
594264
public void write(FileColumn[] columns, List<String[]> lines) throws IOException
    {
        Object contents = getContents(columns, lines);
        if(stream != null && contents instanceof byte[])
        {
            byte[] bytes = (byte[])contents;
            stream.write(bytes);
        }
    }

    /**
     * Close the output file objects.
     */
    public void close()
    {
        try
        {
            // Close the workbook
            if(workbook != null)
                workbook.close();
        }
        catch(Exception e)
        {
        }

        try
        {
            // Flush and close the byte stream
            if(baos != null)
            {
                baos.flush();
                baos.close();
            }
        }
422648
public void setRow(int row, DoubleVector data) {
        checkIndices(row, data.length() -1);

        if (cols <= data.length())
            cols = data.length();

        Vectors.copy(updateRow(row), data);
    }
476349
public void write(RowOutputInterface out) {

        out.writeSize(storageSize);
        out.writeData(rowData, tTable.colTypes);
        out.writeEnd();

        hasDataChanged = false;
    }
910983
protected void writeTableInit(Table t) throws IOException {

        tableRowCount = 0;

        rowOut.reset();
        rowOut.writeSize(0);
        rowOut.writeString(t.getName().name);
        rowOut.writeInt(INSERT_WITH_SCHEMA);
        rowOut.writeString(t.getSchemaName().name);
        rowOut.writeIntData(rowOut.size(), 0);
        fileStreamOut.write(rowOut.getOutputStream().getBuffer(), 0,
                            rowOut.size());
    }
63970
protected void writeRow(Session session, Table t,
                            Object[] data) throws IOException {

        rowOut.reset();
        rowOut.writeRow(data, t.getColumnTypes());
        fileStreamOut.write(rowOut.getOutputStream().getBuffer(), 0,
                            rowOut.size());

        tableRowCount++;
    }
602494
public void write(DataOutput out) throws IOException {
    UTF8.writeString(out, file);
    out.writeLong(start);
    out.writeLong(length);
  }
589596
public void update(final T row)
	{
		final int index = data.indexOf(row);
		if (index != -1)
		{
			data.set(index, row);
			fireTableDataChanged();
		}
	}