Write Internal SUPBOOK record
432709
private function _writeSupbookInternal()
	{
		$record    = 0x01AE;   // Record identifier
		$length    = 0x0004;   // Bytes to follow

		$header    = pack("vv", $record, $length);
		$data      = pack("vv", $this->_phpExcel->getSheetCount(), 0x0401);
		return $this->writeData($header . $data);
	}
351840
void write(String prefix, File catalog) throws IOException {
		File backup = File.createTempFile(prefix, null, catalog.getParentFile());
		if (catalog.exists()) {
			// Create a copy of the current state
			Files.copy(catalog.toPath(), backup.toPath(), StandardCopyOption.REPLACE_EXISTING);
		}

		// Update the file
		try (ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(catalog))) {
			oos.writeObject(this);
			backup.delete();
		} catch (IOException e) {
			try {
				Files.move(backup.toPath(), catalog.toPath(), StandardCopyOption.ATOMIC_MOVE);
			} catch (IOException e2) {
				logger.log(Level.INFO, "A backup has been saved at: " + backup, e2);
			}
			throw new IOException("Failed to update file: " + catalog, e);
		}
	}
1063457
def write_record(self, record, now):
        """"""
        self.write_name(record.name)
        self.write_short(record.type)
        if record.unique and self.multicast:
            self.write_short(record.clazz | _CLASS_UNIQUE)
        else:
            self.write_short(record.clazz)
        if now == 0:
            self.write_int(record.ttl)
        else:
            self.write_int(record.get_remaining_ttl(now))
        index = len(self.data)
        # Adjust size for the short we will write before this record
        #
        self.size += 2
        record.write(self)
        self.size -= 2

        length = len(b''.join(self.data[index:]))
        self.insert_short(index, length)
1147348
def write_record(fo, datum, schema):
    """"""
    for field in schema['fields']:
        name = field['name']
        if name not in datum and 'default' not in field and \
                'null' not in field['type']:
            raise ValueError('no value and no default for %s' % name)
        write_data(fo, datum.get(
            name, field.get('default')), field['type'])
155847
def _write(self, str_buf):
    """"""
    self._filehandle.write(str_buf)
    self._buf_size += len(str_buf)
1362484
def _write(self):
        
        self.json_file.seek(0)
        self.json_file.truncate()
        dump = json.dumps(self.backup_dict)
        dump_c = zlib.compress(dump.encode('utf-8'))
        self.json_file.write(dump_c)
272462
def _create_record(self, rtype, name, content):
        
        result = False
        name = self._relative_name(name)
        ttl = None

        # TODO: shoud assert that this is an int
        if self.ttl:
            ttl = self.ttl

        with localzone.manage(self.filename, self.origin, autosave=True) as zone:
            if zone.add_record(name, rtype, content, ttl=ttl):  # pylint: disable=no-member
                result = True

        LOGGER.debug("create_record: %s", result)
        return result
953985
private void internalWrite(byte[] b, int off, int len, boolean finish) throws IOException {
        coder.output = embiggen(coder.output, coder.maxOutputSize(len));
        if (!coder.process(b, off, len, finish)) {
            throw new Base64DataException("bad base-64");
        }
        out.write(coder.output, 0, coder.op);
    }
1143624
def _perform_write(self, addr, data):
        """"""
        return self._machine_controller.write(addr, data, self._x, self._y, 0)
588369
def simple_write(filename, group, times, features,
                 properties=None, item='item', mode='a'):
    """"""
    write(filename, group, [item], [times], [features], mode=mode,
          properties=[properties] if properties is not None else None)
2940
def write_csv(file_name, records)
      line_number = exporter.connection_adapter.write(local_file(file_name), records)
    end
79976
public static void writeBook(Workbook book, OutputStream out) throws IORuntimeException {
		try {
			book.write(out);
		} catch (IOException e) {
			throw new IORuntimeException(e);
		}
	}
572575
function Record( buffer, start, end ) {

  if( !(this instanceof Record) )
    return new Record( buffer, start, end )

  /** @type {Number} NEWLDR record size */
  this.size = 0x16
  // (80h-FEh, 00h-7Eh, FFh, 7Fh)
  // (optional, zero if not used)
  /** @type {Number} Physical drive and boot flag */
  this.physicalDrive = 0x00
  // (i.e. IBMBIO.LDR, 000000h if not used)
  /** @type {CHS} CHS address of LOADER boot sector or image file */
  this.firstCHS = new CHS()
  // (80h: default; 00h: always use DL; FFh: always use table entry)
  /** @type {Number} Allowed DL minimum, else take from partition table */
  this.minDL = 0x00
  /** @type {Number} LBA of LOADER boot sector or image file (optional) */
  this.firstLBA = 0x00000000
  // (default 0000h if not used, else 0024h or 01FDh)
  /** @type {Number} Patch offset of VBR boot unit */
  this.patchOffset = 0x0000
  /** @type {Number} Checksum (0000h if not used) */
  this.checksum = 0x0000
  // ("MSWIN4" for REAL/32, see also offset +0DAh,
  // corresponds with OEM label at offset +003h in VBRs)
  /** @type {String} OEM loader signature (optional) */
  this.signature = 'MSWIN4'

  if( Buffer.isBuffer( buffer ) ) {
    this.buffer = buffer.slice( start, end )
  }

}
1344001
private void writePendingToFile() throws java.io.IOException, InternalLogException, LogIncompatibleException
    {
        if (tc.isEntryEnabled())
            Tr.entry(tc, "writePendingToFile");

        synchronized (_pendingWriteList)
        {
            LogRecord[] records = (LogRecord[]) _pendingWriteList.toArray(new LogRecord[0]);

            // Don't use vectored IO unless we're told to.
            if (!Boolean.getBoolean("com.ibm.ws.recoverylog.spi.UseVectoredIO"))
            {
                // Put the file header at the front of the list
                ByteBuffer header = (ByteBuffer) _fileBuffer.duplicate().position(0).limit(_logFileHeader.length());
                _fileChannel.write(header, 0);

                // Write the remainder of the list
                for (int i = 0; i < records.length; i++)
                {
                    if (tc.isDebugEnabled())
                        Tr.debug(tc, "Performing write at position " + records[i].absolutePosition());
                    _fileChannel.write((ByteBuffer) records[i]._buffer.flip(), records[i].absolutePosition());
                }
            }
            else
            {
                // Sort the records into ascending order based on their absolute
                // position in the file.  We're going to try and keep the disk
                // moving forward.
                Arrays.sort(records, _recordComparator);

                // Now separate the records into two arrays:
                //   o ByteBuffers of data
                //   o Absolute File positions
                ByteBuffer[] buffers = new ByteBuffer[records.length + 1];
                int[] positions = new int[records.length + 1];

                for (int i = 0; i < records.length; i++)
                {
                    buffers[i + 1] = (ByteBuffer) records[i]._buffer.flip();
                    positions[i + 1] = records[i].absolutePosition();
                }

                // Put the file header at the front of the list
                buffers[0] = (ByteBuffer) _fileBuffer.duplicate().position(0).limit(_logFileHeader.length());
                positions[0] = 0;

                // Here's where we go through the list and attempt to write
                // batches of adjacent records using vectored I/O.
                int idx = 0;
                while (idx < buffers.length)
                {
                    int min = idx;
                    int max = idx;

                    // Somewhere in the middle
                    while (max <= (buffers.length - 2))
                    {
                        if (positions[max + 1] == (positions[max] + buffers[max].remaining()))
                            max++;
                    }

                    // Do the actual writes                    
                    _fileChannel.position(positions[min]);
                    _fileChannel.write(buffers, min, (max - min + 1));

                    // Go back and find the next batch
                    idx = max + 1;
                }
            }

            // Cleanup the pending write list for the next force
            _pendingWriteList.clear();
        }

        if (tc.isEntryEnabled())
            Tr.exit(tc, "writePendingToFile");
    }
800946
function _storeSupbookInternal()
    {
        $record    = 0x01AE;   // Record identifier
        $length    = 0x0004;   // Bytes to follow

        $header    = pack("vv", $record, $length);
        $data      = pack("vv", count($this->_worksheets), 0x0104);
        $this->_append($header . $data);
    }
458414
def __write_record(self, record_type, data):
    """"""
    length = len(data)

    crc = crc32c.crc_update(crc32c.CRC_INIT, [record_type])
    crc = crc32c.crc_update(crc, data)
    crc = crc32c.crc_finalize(crc)

    self.__writer.write(
        struct.pack(_HEADER_FORMAT, _mask_crc(crc), length, record_type))
    self.__writer.write(data)
    self.__position += _HEADER_LENGTH + length
864948
def write_spo(sub, prd, obj):
    '''
        
    '''
    rcvtriples.append(make_spo(sub, prd, obj))