This method writes one column of H2O data frame at a time.

@param oneColumn
@param columnType
@param cIdx
@param rowNumber
@param dout
183772
private void write1column(ColumnVector oneColumn, String columnType, int cIdx, int rowNumber,ParseWriter dout) {
    if(oneColumn.isRepeating && !oneColumn.noNulls) { // ALL NAs
      for(int i = 0; i < rowNumber; ++i)
        dout.addInvalidCol(cIdx);
    } else  switch (columnType.toLowerCase()) {
      case "bigint":
      case "boolean":
      case "int":
      case "smallint":
      case "tinyint":
        writeLongcolumn((LongColumnVector)oneColumn, cIdx, rowNumber, dout);
        break;
      case "float":
      case "double":
        writeDoublecolumn((DoubleColumnVector)oneColumn, cIdx, rowNumber, dout);
        break;
      case "numeric":
      case "real":
        if (oneColumn instanceof LongColumnVector)
          writeLongcolumn((LongColumnVector)oneColumn, cIdx, rowNumber, dout);
        else
          writeDoublecolumn((DoubleColumnVector)oneColumn, cIdx, rowNumber, dout);
        break;
      case "string":
      case "varchar":
      case "char":
//        case "binary":  //FIXME: only reading it as string right now.
        writeStringcolumn((BytesColumnVector)oneColumn, cIdx, rowNumber, dout);
        break;
      case "date":
      case "timestamp":
        writeTimecolumn((LongColumnVector)oneColumn, columnType, cIdx, rowNumber, dout);
        break;
      case "decimal":
        writeDecimalcolumn((DecimalColumnVector)oneColumn, cIdx, rowNumber, dout);
        break;
      default:
        throw new IllegalArgumentException("Unsupported Orc schema type: " + columnType);
    }
  }
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++;
    }
620255
private static void writeHeader(DataOutputStream out, 
                                  BlockMetadataHeader header) 
                                  throws IOException {
    out.writeShort(header.getVersion());
    header.getChecksum().writeHeader(out);
  }
1289708
public void writeData(int l, Type[] types, Object[] data,
                          HashMappedList cols, int[] primaryKeys) {

        boolean hasPK = primaryKeys != null && primaryKeys.length != 0;
        int     limit = hasPK ? primaryKeys.length
                              : l;

        for (int i = 0; i < limit; i++) {
            int    j = hasPK ? primaryKeys[i]
                             : i;
            Object o = data[j];
            Type   t = types[j];

            if (cols != null) {
                ColumnSchema col = (ColumnSchema) cols.get(j);

                writeFieldPrefix();
                writeString(col.getName().statementName);
            }

            if (o == null) {
                writeNull(t);

                continue;
            }

            writeFieldType(t);

            switch (t.typeCode) {

                case Types.SQL_ALL_TYPES :
                    throw Error.runtimeError(
                        ErrorCode.U_S0500, "RowOutputBase");
                case Types.SQL_CHAR :
                case Types.SQL_VARCHAR :
                case Types.VARCHAR_IGNORECASE :
                    writeChar((String) o, t);
                    break;

                case Types.TINYINT :
                case Types.SQL_SMALLINT :
                    writeSmallint((Number) o);
                    break;

                case Types.SQL_INTEGER :
                    writeInteger((Number) o);
                    break;

                case Types.SQL_BIGINT :
                    writeBigint((Number) o);
                    break;

                case Types.SQL_REAL :
                case Types.SQL_FLOAT :
                case Types.SQL_DOUBLE :
                    writeReal((Double) o);
                    break;

                case Types.SQL_NUMERIC :
                case Types.SQL_DECIMAL :
                    writeDecimal((BigDecimal) o, t);
                    break;

                case Types.SQL_BOOLEAN :
                    writeBoolean((Boolean) o);
                    break;

                case Types.SQL_DATE :
                    writeDate((TimestampData) o, t);
                    break;

                case Types.SQL_TIME :
                case Types.SQL_TIME_WITH_TIME_ZONE :
                    writeTime((TimeData) o, t);
                    break;

                case Types.SQL_TIMESTAMP :
                case Types.SQL_TIMESTAMP_WITH_TIME_ZONE :
                    writeTimestamp((TimestampData) o, t);
                    break;

                case Types.SQL_INTERVAL_YEAR :
                case Types.SQL_INTERVAL_YEAR_TO_MONTH :
                case Types.SQL_INTERVAL_MONTH :
                    writeYearMonthInterval((IntervalMonthData) o, t);
                    break;

                case Types.SQL_INTERVAL_DAY :
                case Types.SQL_INTERVAL_DAY_TO_HOUR :
                case Types.SQL_INTERVAL_DAY_TO_MINUTE :
                case Types.SQL_INTERVAL_DAY_TO_SECOND :
                case Types.SQL_INTERVAL_HOUR :
                case Types.SQL_INTERVAL_HOUR_TO_MINUTE :
                case Types.SQL_INTERVAL_HOUR_TO_SECOND :
                case Types.SQL_INTERVAL_MINUTE :
                case Types.SQL_INTERVAL_MINUTE_TO_SECOND :
                case Types.SQL_INTERVAL_SECOND :
                    writeDaySecondInterval((IntervalSecondData) o, t);
                    break;

                case Types.OTHER :
                    writeOther((JavaObjectData) o);
                    break;

                case Types.SQL_BLOB :
                    writeBlob((BlobData) o, t);
                    break;

                case Types.SQL_CLOB :
                    writeClob((ClobData) o, t);
                    break;

                case Types.SQL_BINARY :
                case Types.SQL_VARBINARY :
                    writeBinary((BinaryData) o);
                    break;

                case Types.SQL_BIT :
                case Types.SQL_BIT_VARYING :
                    writeBit((BinaryData) o);
                    break;

                default :
                    throw Error.runtimeError(
                        ErrorCode.U_S0500,
                        t.getNameString());
            }
        }
    }
1020625
public void write(OutputStream stream) throws IOException {
        //Creating buffer
        ByteArrayOutputStream bos = new ByteArrayOutputStream();

        //Creating compressed output data stream
        DeflaterOutputStream deflate = new DeflaterOutputStream(bos);
        DataOutputStream dataStream = new DataOutputStream(deflate);

        //Writing index step
        dataStream.writeLong(step);

        //Writing boundaries of index
        dataStream.writeLong(getStartingRecordNumber());
        dataStream.writeLong(getLastRecordNumber());

        //Writing number of meta-records
        dataStream.writeInt(metadata.size());

        //Writing meta records
        for (Map.Entry<String, String> e : metadata.entrySet()) {
            dataStream.writeUTF(e.getKey());
            dataStream.writeUTF(e.getValue());
        }

        //Writing number of entries
        dataStream.writeInt(index.size());

        //Writing index
        long lastValue = 0, v;
        for (int i = 0; i < index.size(); ++i) {
            IOUtil.writeRawVarint64(dataStream, (v = index.get(i)) - lastValue);
            lastValue = v;
        }

        //Flushing gzip output stream to underlying stream
        deflate.finish();

        //Creating raw output stream
        DataOutputStream raw = new DataOutputStream(stream);

        //Writing non-compressed magic number
        raw.writeInt(MAGIC);

        //Writing index size
        raw.writeInt(bos.size());

        //Writes index
        raw.write(bos.toByteArray());
    }
1130780
public void write(ObjectWriter out, PersistedNodeData nodeData) throws IOException
   {
      // write id
      out.writeInt(SerializationConstants.PERSISTED_NODE_DATA);

      // TransientItemData
      out.writeString(nodeData.getQPath().getAsString());
      out.writeString(nodeData.getIdentifier());

      if (nodeData.getParentIdentifier() != null)
      {
         out.writeByte(SerializationConstants.NOT_NULL_DATA);
         out.writeString(nodeData.getParentIdentifier());
      }
      else
         out.writeByte(SerializationConstants.NULL_DATA);

      out.writeInt(nodeData.getPersistedVersion());
      // -------------------

      out.writeInt(nodeData.getOrderNumber());

      // primary type
      out.writeString(nodeData.getPrimaryTypeName().getAsString());

      // mixins
      InternalQName[] mixinNames = nodeData.getMixinTypeNames();

      if (mixinNames != null)
      {
         out.writeByte(SerializationConstants.NOT_NULL_DATA);
         out.writeInt(mixinNames.length);
         for (int i = 0; i < mixinNames.length; i++)
         {
            out.writeString(mixinNames[i].getAsString());
         }
      }
      else
      {
         out.writeByte(SerializationConstants.NULL_DATA);
      }

      ACLWriter wr = new ACLWriter();

      AccessControlList acl = nodeData.getACL();
      if (acl != null)
      {
         out.writeByte(SerializationConstants.NOT_NULL_DATA);
         wr.write(out, acl);
      }
      else
      {
         out.writeByte(SerializationConstants.NULL_DATA);
      }
   }
801175
@Override
    public void writeColumn(HTableInterface htable, String columnFamily, Object rowKey, Attribute column,
            Object columnObj) throws IOException
    {
        Put p = new Put(HBaseUtils.getBytes(rowKey));
        p.add(Bytes.toBytes(columnFamily), Bytes.toBytes(((AbstractAttribute) column).getJPAColumnName()),
                Bytes.toBytes(columnObj.toString()));

        htable.put(p);
    }
209948
private void writeRow(String... columns) throws IOException {
        StringBuilder html = new StringBuilder();
        html.append("<tr>");
        for(String data : columns) {
            html.append("<td>").append(data).append("</td>");
        }
        html.append("</tr>\n");
        writer.write(html.toString());
    }
65909
public final void write (@Nonnull final NODETYPE aNode, @Nonnull @WillNotClose final Writer aWriter)
  {
    final XMLEmitter aXMLWriter = createXMLEmitter (aWriter, m_aSettings);
    // No parent node
    // No previous and no next sibling
    emitNode (aXMLWriter, null, null, aNode, null);
    // Flush is important for Writer!
    StreamHelper.flush (aWriter);
  }
54467
public void setCellMerge(final int colIndex, final int rowMerge, final int columnMerge) throws IOException {
        if (rowMerge <= 0 || columnMerge <= 0) return;
        if (rowMerge <= 1 && columnMerge <= 1) return;

        this.parent.setCellMerge(this.rowIndex, colIndex, rowMerge, columnMerge);
    }
630280
@Override
    public void writeColumns(Table htable, Object rowKey, Map<String, Object> columns, String columnFamilyName)
            throws IOException
    {
        if (columns != null && !columns.isEmpty())
        {
            Put p = new Put(HBaseUtils.getBytes(rowKey));
            for (String columnName : columns.keySet())
            {
                p.addColumn(columnFamilyName.getBytes(), Bytes.toBytes(columnName),
                        HBaseUtils.getBytes(columns.get(columnName)));
            }
            htable.put(p);
        }
    }
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);
	}
319286
public function write_number($row, $col, $num, $format = null) {
        if (!isset($this->data[$row][$col])) {
            $this->data[$row][$col] = new MoodleODSCell();
        }
        if (is_array($format)) {
            $format = new MoodleODSFormat($format);
        }
        $this->data[$row][$col]->value = $num;
        $this->data[$row][$col]->type = 'float';
        $this->data[$row][$col]->format = $format;
        $this->data[$row][$col]->formula = null;
    }
139008
@Override
    public void write(int oneByte) {
        if (count == buf.length) {
            expand(1);
        }
        buf[count++] = (byte) oneByte;
    }
715154
@Override
    public void write(DataWriter writer) throws IOException {
        writer.writeInt(pos);  /* array position */
        writer.writeInt(val);  /* data value */
        writer.writeLong(scn); /* SCN value */
    }
792148
public void write(int datum) throws IOException {
        if (closed) {
            throw new IOException("Stream closed");
        } else {
            if (index == blockSize) {
                addBuffer();
            }

            // store the byte
            buffer[index++] = (byte) datum;
        }
    }
22010
public function write_formula($row, $col, $formula, $format = null) {
        $this->worksheet->setCellValueExplicitByColumnAndRow($col, $row+1, $formula, PHPExcel_Cell_DataType::TYPE_FORMULA);
        $this->apply_format($row, $col, $format);
    }