write the contents of a journal message.
428204
@Override
  public void write(byte[] buffer, int offset, int length)
  {
    try {
      OutputStream os = _os;

      if (os != null) {
        os.write(buffer, offset, length);
      }
    } catch (Exception e) {
      log.log(Level.FINER, e.toString(), e);
    }
  }
1095403
def _log(code, message, level, domain):
        """"""
        entry = LogEntry(level, domain, code, message)
        Logger.journal.append(entry)

        if Logger.silent:
            return

        if level >= Logger._verbosity:
            _print_entry(entry)
42199
@Override
  void writeJournal(OutputStream os, 
                    byte[] buffer, int offset,
                    BlobOutputStream blob)
    throws IOException
  {
    if (blob == null) {
      BitsUtil.writeInt16(os, 0);
      return;
    }

    if (blob.isLargeBlob()) {
      blob.flushBlob();
      
      BitsUtil.writeInt16(os, LARGE_BLOB_MASK | 4);
      BitsUtil.writeInt(os, blob.getBlobId());
      return;
    }
    
    int len = blob.getSize();
    
    if (len >= 32 * 1024) {
      throw new IllegalStateException("TOO_BIG: " + len);
    }
    
    BitsUtil.writeInt16(os, len);
    
    blob.writeToStream(os);
  }
927522
def write(self, *messages):
        
        for message in messages:
            if not isinstance(message, Token):
                message = ensure_tuple(message, cls=self._input_type, length=self._input_length)
                if self._input_length is None:
                    self._input_length = len(message)
            self.input.put(message)
613607
def do_write(self, msg):
        """"""
        self.stream = self.do_open()
        stream = self.stream
        stream.write(msg)
        if self.terminator:
            stream.write(self.terminator)
        stream.flush()
        self._close()
        return
134977
public void writeContent(final OutputStream result) throws IOException
    {    	
        result.write(TEXT_HIDDEN_ON);
        result.write(OPEN_GROUP);
        if(this.showPageNumber) {
            result.write(TOC_ENTRY_PAGE_NUMBER);
        } else {
            result.write(TOC_ENTRY_NO_PAGE_NUMBER);
        }
        result.write(DELIMITER);
        this.document.filterSpecialChar(result, this.entry, true, false);
        result.write(CLOSE_GROUP);
        result.write(TEXT_HIDDEN_OFF);
    }
321684
def write(self):
        """"""
        with open(self.log_path, "w") as f:
            json.dump(self.log_dict, f, indent=1)
56207
def write(self, text):
        """"""
        self.logger.log(self.loglevel, text, extra={'terminator': None})
384058
def on_message(self, message):
        
        self._record_activity()
        if hasattr(self, 'ws'):
            self.ws.write_message(message, binary=isinstance(message, bytes))
1164083
def write(self, text):
        """"""
        # similar to tqdm.write()
        # https://pypi.python.org/pypi/tqdm#writing-messages
        sys.stdout.write("\r")
        self._clear_line()

        _text = to_unicode(text)
        if PY2:
            _text = _text.encode(ENCODING)

        # Ensure output is bytes for Py2 and Unicode for Py3
        assert isinstance(_text, builtin_str)

        sys.stdout.write("{0}\n".format(_text))
437542
public function WriteContent() {
        $output = $this->WriteGetListMethod();
        $output .= PhpCodeSnippets::CRLF;
        fwrite($this->writer, $output);
    }
83290
function writeMessage(channelName, readerUuid, messageJson, paths) {
    paths = paths || getPaths(channelName);
    const time = microSeconds();
    const writeObject = {
        uuid: readerUuid,
        time,
        data: messageJson
    };

    const token = randomToken(12);
    const fileName = time + '_' + readerUuid + '_' + token + '.json';

    const msgPath = path.join(
        paths.messages,
        fileName
    );

    return writeFile(
        msgPath,
        JSON.stringify(writeObject)
    ).then(() => {
        return {
            time,
            uuid: readerUuid,
            token,
            path: msgPath
        };
    });
}
681416
def write_table(mboxfile, mailTable):
    
    mail_box_contents = mailbox.mbox(mboxfile)

    m_pbar = tqdm.tqdm(range(0,len(mail_box_contents)))
    m_pbar.set_description('Extracting mbox messages...')

    count = 0
    update_interval = min(50,len(mail_box_contents))

    for message in mail_box_contents:
        count += 1
        if count % update_interval == 0:
            m_pbar.update(update_interval)
        clean_from = clean_address(message['From'])
        clean_to = clean_addresses(message['To'])
        clean_cc = clean_addresses(message['Cc'])

        try:
            clean_date = email.parsedate_to_datetime(message['Date'])
        except:
            clean_date = None

        mailTable.append([
            clean_from,
            clean_to,
            clean_cc,
            clean_date,
            message['Subject'],
            get_body(message)
            ])
738697
function writeToLog(level, msg)
    {
        var displayPrefix = "PK-" + pkGuid + ": ";
        if(loggingMechanism && logUserObject)
        {
            loggingMechanism.addLog(level, displayPrefix + msg, logUserObject);
        }
        else
        {
            console.log(displayPrefix + msg);
        }
    }
1085451
def _write_json(self, message, extra):
        '''
        
        '''
        self.logger.info(message, extra=extra)
240031
def write(self, out):
        """"""
        out.write_string(self.text, len(self.text))
843875
def write(self, message):
        

        self.__thread_local_ctx.write_count += 1

        try:
            if self.__thread_local_ctx.write_count > 1:
                return

            # For each line in the buffer ending with \n, output that line to
            # the logger
            msgs = (self.buffer + message).split('\n')
            self.buffer = msgs.pop(-1)
            for m in msgs:
                self.log_orig(m, echo=True)
        finally:
            self.__thread_local_ctx.write_count -= 1