/* Special writers
773833
public function toChunks(Csv $csv, $size=1000)
    {
        return Writer\ChunksWriter::write($this, $csv, $size);
    }
542696
@Deprecated
    @Override
    protected int write(int unit) {
        int newLength=charsLength+1;
        ensureCapacity(newLength);
        charsLength=newLength;
        chars[chars.length-charsLength]=(char)unit;
        return charsLength;
    }
1069329
private static void writeZonePropsByDOW_GEQ_DOM_sub(Writer writer, int month,
            int dayOfMonth, int dayOfWeek, int numDays, long untilTime, int fromOffset) throws IOException {

        int startDayNum = dayOfMonth;
        boolean isFeb = (month == Calendar.FEBRUARY);
        if (dayOfMonth < 0 && !isFeb) {
            // Use positive number if possible
            startDayNum = MONTHLENGTH[month] + dayOfMonth + 1;
        }
        beginRRULE(writer, month);
        writer.write(ICAL_BYDAY);
        writer.write(EQUALS_SIGN);
        writer.write(ICAL_DOW_NAMES[dayOfWeek - 1]);    // SU, MO, TU...
        writer.write(SEMICOLON);
        writer.write(ICAL_BYMONTHDAY);
        writer.write(EQUALS_SIGN);

        writer.write(Integer.toString(startDayNum));
        for (int i = 1; i < numDays; i++) {
            writer.write(COMMA);
            writer.write(Integer.toString(startDayNum + i));
        }

        if (untilTime != MAX_TIME) {
            appendUNTIL(writer, getDateTimeString(untilTime + fromOffset));
        }
        writer.write(NEWLINE);
    }
172076
void writePositiveExtensionInt(int extensionType, int reference) throws IOException {
        if (reference < 0) {
            throw new IllegalArgumentException("Can only serialize positive references: " + reference);
        }
        if (reference < 0xFF) {
            output.write(FIX_EXT_1);
            output.write(extensionType);
            output.writeByte((byte) reference);
        } else if (reference < 0xFFFF) {
            output.writeByte(FIX_EXT_2);
            output.write(extensionType);
            output.writeShort((short) reference);
        } else {
            output.writeByte(FIX_EXT_4);
            output.write(extensionType);
            output.writeInt(reference);
        }
    }
512475
public void mutationMayCallWriter() {
    CacheWriter<K, V> _writer = writer();
    if (_writer == null) {
      skipWritingNoWriter();
      return;
    }
    if (remove) {
      try {
        entry.nextProcessingStep(WRITE);
        _writer.delete(key);
      } catch (Throwable t) {
        onWriteFailure(t);
        return;
      }
      onWriteSuccess();
      return;
    }
    if (newValueOrException instanceof ExceptionWrapper) {
      skipWritingForException();
      return;
    }
    entry.nextProcessingStep(WRITE);
    try {
      _writer.write(key, newValueOrException);
    } catch (Throwable t) {
      onWriteFailure(t);
      return;
    }
    onWriteSuccess();
  }
957487
function writePrompt () {
        charm.position(1,1);
        charm.display('bright');
        charm.write(promptStart);
        charm.write(' ');
        charm.display('reset');
    }
1030897
private static void appendUNTIL(Writer writer, String until) throws IOException {
        if (until != null) {
            writer.write(SEMICOLON);
            writer.write(ICAL_UNTIL);
            writer.write(EQUALS_SIGN);
            writer.write(until);
        }
    }
521260
function(targetOptions, sourceOptions, keys, mergeWriteConcern) {
  // Mix in any allowed options
  for (var i = 0; i < keys.length; i++) {
    if (!targetOptions[keys[i]] && sourceOptions[keys[i]] !== undefined) {
      targetOptions[keys[i]] = sourceOptions[keys[i]];
    }
  }

  // No merging of write concern
  if (!mergeWriteConcern) return targetOptions;

  // Found no write Concern options
  var found = false;
  for (i = 0; i < writeConcernKeys.length; i++) {
    if (targetOptions[writeConcernKeys[i]]) {
      found = true;
      break;
    }
  }

  if (!found) {
    for (i = 0; i < writeConcernKeys.length; i++) {
      if (sourceOptions[writeConcernKeys[i]]) {
        targetOptions[writeConcernKeys[i]] = sourceOptions[writeConcernKeys[i]];
      }
    }
  }

  return targetOptions;
}
727784
private function serializePriv(Writer $writer, $privName, $privilege)
    {
        $writer->startElement('{DAV:}supported-privilege');

        $writer->startElement('{DAV:}privilege');
        $writer->writeElement($privName);
        $writer->endElement(); // privilege

        if (!empty($privilege['abstract'])) {
            $writer->writeElement('{DAV:}abstract');
        }
        if (!empty($privilege['description'])) {
            $writer->writeElement('{DAV:}description', $privilege['description']);
        }
        if (isset($privilege['aggregates'])) {
            foreach ($privilege['aggregates'] as $subPrivName => $subPrivilege) {
                $this->serializePriv($writer, $subPrivName, $subPrivilege);
            }
        }

        $writer->endElement(); // supported-privilege
    }
81994
public void writeExternal(PofWriter writer)
            throws IOException {
        super.writeExternal(writer);
        writer.writeBinary(0, toBinary(value));
        writer.writeBoolean(1, fReturnOld);
    }
628141
private Writer getWriters(ScriptWrapper script) {
		Writer delegatee = this.writers;
		Writer writer = script.getWriter();
		if (writer != null) {
			// Use the script specific writer in addition to the std one
			MultipleWriters scriptWriters = new MultipleWriters();
			scriptWriters.addWriter(writer);
			scriptWriters.addWriter(writers);
			delegatee = scriptWriters;
		}
		return new ScriptWriter(script, delegatee, outputListeners);
	}
1205325
private void writeToImpl(Writer out, String encoding, byte[] bufferToWrite, int bufferToWriteLen)
            throws IOException {
        String writeStr;
        if (encoding != null) {
            writeStr = new String(bufferToWrite, 0, bufferToWriteLen, encoding);
        } else {
            writeStr = new String(bufferToWrite, 0, bufferToWriteLen);
        }
        out.write(writeStr);
    }
242436
function writePalette() {
    out.writeBytes(colorTab);
    var n = (3 * 256) - colorTab.length;
    for (var i = 0; i < n; i++) out.writeByte(0);
  }
392325
function rewrite(node, nstr) {
    var lo = node.range[0], hi = node.range[1]
    for(var i=lo+1; i<hi; ++i) {
      exploded[i] = ""
    }
    exploded[lo] = nstr
  }
8702
private void _writeStringASCII(final int len, final int maxNonEscaped)
        throws IOException, JsonGenerationException
    {
        // And then we'll need to verify need for escaping etc:
        int end = _outputTail + len;
        final int[] escCodes = _outputEscapes;
        final int escLimit = Math.min(escCodes.length, maxNonEscaped+1);
        int escCode = 0;
        
        output_loop:
        while (_outputTail < end) {
            char c;
            // Fast loop for chars not needing escaping
            escape_loop:
            while (true) {
                c = _outputBuffer[_outputTail];
                if (c < escLimit) {
                    escCode = escCodes[c];
                    if (escCode != 0) {
                        break escape_loop;
                    }
                } else if (c > maxNonEscaped) {
                    escCode = CharacterEscapes.ESCAPE_STANDARD;
                    break escape_loop;
                }
                if (++_outputTail >= end) {
                    break output_loop;
                }
            }
            int flushLen = (_outputTail - _outputHead);
            if (flushLen > 0) {
                _writer.write(_outputBuffer, _outputHead, flushLen);
            }
            ++_outputTail;
            _prependOrWriteCharacterEscape(c, escCode);
        }
    }
1328222
function write (to, what, locals) {
  const content = ejs.render(what, _.extend({}, (locals || {}), { S: underscoreString }))
  return mkdirp(path.dirname(to)).then(() => {
    return fs.writeFileAsync(to, content, 'utf8')
  })
}
1336208
function gli_window_buffer_put_special(win, special, flowbreak) {
    gli_window_buffer_deaccumulate(win);

    var conta = win.content;
    var arr = undefined;
    var obj;

    /* The next bit is a simplified version of the array-append code 
       from deaccumulate(). It's simpler because we have exactly one
       item to add. */

    if (conta.length == 0) {
        arr = [];
        obj = { content: arr, append: true };
        if (flowbreak)
            obj.flowbreak = true;
        conta.push(obj);
    }
    else {
        obj = conta[conta.length-1];
        if (flowbreak)
            obj.flowbreak = true;
        if (!obj.content) {
            arr = [];
            obj.content = arr;
        }
        else {
            arr = obj.content;
        }
    }
    
    if (arr !== undefined && special !== undefined) {
        arr.push(special);
    }
}