Write out updated data and header to
            the original input file for this object.
334502
def updateData(self,exten,data):
        
        _extnum=self._interpretExten(exten)
        fimg = fileutil.openImage(self._filename, mode='update', memmap=False)
        fimg[_extnum].data = data
        fimg[_extnum].header = self._image[_extnum].header
        fimg.close()
688319
def write(self):
        
        # write data
        self.project_manager.writeInput(session=self.db_session,
                                        directory=self.project_directory,
                                        name=self.project_manager.name)
1317909
def _update_header(orig_vcf, base_file, new_lines, chrom_process_fn=None):
    
    new_header = "%s-sample_header.txt" % utils.splitext_plus(base_file)[0]
    with open(new_header, "w") as out_handle:
        chrom_line = None
        with utils.open_gzipsafe(orig_vcf) as in_handle:
            for line in in_handle:
                if line.startswith("##"):
                    out_handle.write(line)
                else:
                    chrom_line = line
                    break
        assert chrom_line is not None
        for line in new_lines:
            out_handle.write(line + "\n")
        if chrom_process_fn:
            chrom_line = chrom_process_fn(chrom_line)
        out_handle.write(chrom_line)
    return new_header
291469
def update(self, incoming_stream, seek=0, size=None, chunk_size=None,
               progress_callback=None):
        """"""
        fp = self.open(mode='r+b')
        try:
            fp.seek(seek)
            bytes_written, checksum = self._write_stream(
                incoming_stream, fp, chunk_size=chunk_size,
                size=size, progress_callback=progress_callback)
        finally:
            fp.close()

        return bytes_written, checksum
1298255
def fix_input_files(headerDir, sourceDir, containers=['vector', 'list', 'set', 'map'],
                    seqType='both', verbose=False):
    """"""
    # The new modification time.
    timestamp = datetime.datetime.now();
    # Fix the input files for containers in their variadic form.
    if seqType == "both" or seqType == "variadic":
        if verbose:
            print "Fix input files for pre-processing Boost.MPL variadic containers."
        fix_input_files_for_variadic_seq(headerDir, sourceDir, timestamp)
    # Fix the input files for containers in their numbered form.
    if seqType == "both" or seqType == "numbered":
        if verbose:
            print "Fix input files for pre-processing Boost.MPL numbered containers."
        fix_input_files_for_numbered_seq(headerDir, ".hpp", timestamp, containers)
        fix_input_files_for_numbered_seq(sourceDir, ".cpp", timestamp, containers)
813715
def update(self, of):
        """"""

        # The other values should be set when the file object is created with dataset.bsfile()
        for p in ('mime_type', 'preference', 'state', 'hash', 'modified', 'size', 'contents', 'source_hash', 'data'):
            setattr(self, p, getattr(of, p))

        return self
996790
def regenerateToOutputFile(outFile, checkNoChanges = false)
      executeRubyComponents
      @pageObject.process
      writeRegeneratedFile(outFile, checkNoChanges, checkNoChanges)
    end
1294299
def update(self, b):  # pylint: disable=method-hidden,invalid-name
        """"""
        with self.__lock:
            output = compress_update(self.__ctx, b)
            if self.__write:
                self.__write(self.__header)
                self.__header = None
                self.__write(output)
                self.update = self.__updateNextWrite
            else:
                header = self.__header
                self.__header = None
                self.update = self.__updateNextReturn
                return header + output
380487
def write_data(self):
        """"""
        self.output_file.write(self.downloaded_file_buffer)
        self.output_file.close()
        self.finished_flag = True
481229
def append(self, data):
    """"""
    data_length = len(data)
    if self._size + data_length > self._flush_size:
      self.flush()

    if not self._exclusive and data_length > _FILE_POOL_MAX_SIZE:
      raise errors.Error(
          "Too big input %s (%s)."  % (data_length, _FILE_POOL_MAX_SIZE))
    else:
      self._buffer.append(data)
      self._size += data_length

    if self._size > self._flush_size:
      self.flush()
694355
void write(ObjectOutputStream out) throws IOException {
        PutField fields = out.putFields();

        fields.put(CONTEXT, threadContextDescriptor.serialize());

        fields.put(EXEC_PROPS, threadContextDescriptor.getExecutionProperties());

        fields.put(INTERNAL_PROP_NAMES, internalPropNames);

        ByteArrayOutputStream bout = new ByteArrayOutputStream();
        ObjectOutputStream oout = new ObjectOutputStream(bout);
        oout.writeObject(object);
        oout.flush();
        fields.put(OBJECT, bout.toByteArray());
        oout.close();

        out.writeFields();
    }
856173
private function saveHeaders() {
	$this->lock();
	$this->file->rewind();
	$headers = $this->file->current();
	if(!empty($headers)) {
		$this->headers = $headers;
	}

	$this->file->next();
	$this->file->flock(LOCK_UN);

	$this->checkIdField();
}
168820
def writeto(self, filename, **kwargs):
        
        fits.PrimaryHDU(header=self).writeto(filename, output_verify='ignore', **kwargs)
281158
def save(self, data, dtype_out_time, dtype_out_vert=False,
             save_files=True, write_to_tar=False):
        """"""
        self._update_data_out(data, dtype_out_time)
        if save_files:
            self._save_files(data, dtype_out_time)
        if write_to_tar and self.proj.tar_direc_out:
            self._write_to_tar(dtype_out_time)
        logging.info('\t{}'.format(self.path_out[dtype_out_time]))
254438
def write(self, data_in, data_out, *args, **kwargs):
        
        self._get_tables(data_in)

        self.file_emulation = False
        outputs = []
        self._prepare_outputs(data_out, outputs)
        output = outputs[0]
        for i in xrange(len(self.tables)):
            table = self.tables[i]

            self._write_table(output, table)

        if data_out != output and hasattr(data_out, 'write'):
            output.Flush()
            output.ReOpen('read')
            file_size = output.GetSize()
            buff = bytearray(file_size)
            output.ReadBuffer(buff, file_size)
            data_out.write(buff)

        if self.file_emulation:
            filename = output.GetName()
            output.Close()
1341945
def _write_mef(self, key, extlist, outfile):
        """"""
        channel = self.fv.get_channel(self.chname)
        with fits.open(outfile, mode='update') as pf:
            # Process each modified data extension
            for idx in extlist:
                k = '{0}[{1}]'.format(key, self._format_extname(idx))
                image = channel.datasrc[k]

                # Insert data and header into output HDU
                pf[idx].data = image.get_data()
                self._write_header(image, pf[idx])

            # Write history to PRIMARY
            self._write_history(key, pf['PRIMARY'])
455370
def _fast_write(self, outfile, value):
        """"""
        outfile.truncate(0)
        outfile.write(str(int(value)))
        outfile.flush()