Writes a header.

    Args:
      output_writer (OutputWriter): output writer.
12430
def _WriteHeader(self, output_writer):
    
    header_string = ''
    if self._title:
      header_string = ' {0:s} '.format(self._title)

    header_string = self._HEADER_FORMAT_STRING.format(header_string)
    output_writer.Write(header_string)
48165
def Write(self, output_writer):
    
    # Round up the column sizes to the nearest tab.
    for column_index, column_size in enumerate(self._column_sizes):
      column_size, _ = divmod(column_size, self._NUMBER_OF_SPACES_IN_TAB)
      column_size = (column_size + 1) * self._NUMBER_OF_SPACES_IN_TAB
      self._column_sizes[column_index] = column_size

    if self._columns:
      self._WriteRow(output_writer, self._columns, in_bold=True)

    for values in self._rows:
      self._WriteRow(output_writer, values)
1244698
def write_output(self):
        """"""
        for data in self.output_data.values():
            self.create_output(data.get('key'), data.get('value'), data.get('type'))
507243
def write(write_entry: FILE_WRITE_ENTRY):
    
    output_path = environ.paths.clean(write_entry.path)
    make_output_directory(output_path)
    writer.write_file(output_path, write_entry.contents)
19724
public static void writeHeader(final VcfHeader header, final PrintWriter writer) {
        checkNotNull(header);
        checkNotNull(writer);

        for (String meta : header.getMeta()) {
            writer.println(meta);
        }
    }
781026
def write_source(self, source):
        
        if not self._header_written:
            observations = [reading.get_observation() for reading in source.get_readings()]
            self.write_headers(observations, self.sys_header)

        self._write_source(source)
905039
def write(self, chars, output):
        
        data = self.generate(chars)
        with open(output, 'wb') as f:
            return f.write(data)
1064037
def write_headers(self):
        
        hlist = []
        for h in self.headers:
            hlist.append("{}: {}".format(h.key, h.value))
        return hlist
396811
final public function setOutputWriter(OutputWriter $outputWriter)
    {
        if ($outputWriter !== $this->outputWriter) {
            $this->outputWriter = $outputWriter;
            $this->consumer = null;
        }
        
        return $this;
    }
596648
def WriteHeader(self):
    """"""
    output_text = self._field_delimiter.join(self._fields)
    output_text = '{0:s}\n'.format(output_text)
    self._output_writer.Write(output_text)
462664
def write_header(self, chunk):
        

        if self.serializer:
            header = self.serializer.serialize_header(chunk)
        else:
            header = chunk

        if self.flushed:
            raise TChannelError("write operation invalid after flush call")

        if (self.argstreams[0].state != StreamState.completed and
                self.argstreams[0].auto_close):
            self.argstreams[0].close()

        return self.argstreams[1].write(header)
8420
public void write(Writer out)
         throws IOException
    {
        writeHtmlHead(out);
        writeBodyTag(out);
        writeElements(out);
        writeHtmlEnd(out);
    }
959027
def write_header(self):
        
        self.fileobj.seek(0)
        header = mar_header.build(dict(index_offset=self.last_offset))
        self.fileobj.write(header)
1108589
def write(self, output_file):
        
        for message_level, message_text in self:
            output_file.write('%s=%s\r\n' % (message_level, message_text))
        output_file.write('\r\n')
1368019
public void write(Writer out)
         throws IOException
    {
        out.write("<!--\n");
        super.write(out);
        out.write("\n-->");
    }
940106
public void writeHeader(WritableByteChannel out) throws IOException {
		// take care of the annoying case where no records have been added...
		if (headerLength == -1) {
			headerLength = MINIMUM_HEADER;
		}
		ByteBuffer buffer = ByteBuffer.allocateDirect(headerLength);
		buffer.order(ByteOrder.LITTLE_ENDIAN);

		// write the output file type.
		buffer.put(MAGIC);

		// write the date stuff
		Calendar c = Calendar.getInstance();
		c.setTime(new Date());
		buffer.put((byte) (c.get(Calendar.YEAR) % 100));
		buffer.put((byte) (c.get(Calendar.MONTH) + 1));
		buffer.put((byte) (c.get(Calendar.DAY_OF_MONTH)));

		// write the number of records in the datafile.
		buffer.putInt(recordCnt);

		// write the length of the header structure.
		buffer.putShort((short) headerLength);

		// write the length of a record
		buffer.putShort((short) recordLength);

		// // write the reserved bytes in the header
		buffer.position(buffer.position() + 17);
        // skip / skip the reserved bytes in the header.
        // write Language driver
        buffer.put(getEncodingByte());
        // skip reserved
        buffer.position(buffer.position() + 2);

		// write all of the header records
		int tempOffset = 0;
        for (DbaseField field : fields) {

            // write the field name
            byte[] fieldName = field.fieldName.getBytes(fileEncoding);
            for (int j = 0; j < 11; j++) {
                if (fieldName.length > j) {
                    buffer.put(fieldName[j]);
                } else {
                    buffer.put((byte) 0);
                }
            }

            // write the field type
            buffer.put((byte) field.fieldType);
            // // write the field data address, offset from the start of the
            // record.
            buffer.putInt(tempOffset);
            tempOffset += field.fieldLength;

            // write the length of the field.
            buffer.put((byte) field.fieldLength);

            // write the decimal count.
            buffer.put((byte) field.decimalCount);

            // write the reserved bytes.
            // for (in j=0; jj<14; j++) out.writeByteLE(0);
            buffer.position(buffer.position() + 14);
        }

		// write the end of the field definitions marker
		buffer.put((byte) 0x0D);

		buffer.position(0);

		int r = buffer.remaining();
                do {
                        r -= out.write(buffer);
                } while (r > 0);
	}
811661
def printheader(h=None):
    """"""
    writer = csv.writer(sys.stdout)
    writer.writerow(header_fields(h))