Give this Message a chance to write its output to the final client.
181280
public boolean write()
    {
        assert state == State.WRITING;

        boolean writeFailed = false;

        try
        {
            if (response.streamTo(transport) < 0)
            {
                writeFailed = true;
                return false;
            }
            else if (!response.isFullyStreamed())
            {
                // if socket couldn't accommodate whole write buffer,
                // continue writing when we get next write signal.

                switchToWrite();
                return true;
            }
        }
        catch (IOException e)
        {
            logger.error("Got an IOException during write!", e);
            writeFailed = true;
            return false;
        }
        finally
        {
            if (writeFailed || response.isFullyStreamed())
                response.close();
        }



        // we're done writing. Now we need to switch back to reading.
        switchToRead();

        return true;
    }
825443
def write_to_console(self, message: str):
        
        if not self._step:
            raise ValueError(
                'Cannot write to the console stdout on an uninitialized step'
            )
        interceptor = self._step.report.stdout_interceptor
        interceptor.write_source('{}'.format(message))
97387
private function finalise()
    {
        // Send output to email
        $this->emailOutput();

        // Call any callback defined
        if (is_callable($this->after)) {
            call_user_func($this->after, $this->output, $this->returnCode);
        }
    }
1172122
def exit(self, result=0, msg=None, *args, **kwargs):
    """"""
    if self._finalizer:
      try:
        self._finalizer()
      except Exception as e:
        try:
          NailgunProtocol.send_stderr(
            self._socket,
            '\nUnexpected exception in finalizer: {!r}\n'.format(e)
          )
        except Exception:
          pass

    try:
      # Write a final message to stderr if present.
      if msg:
        NailgunProtocol.send_stderr(self._socket, msg)

      # Send an Exit chunk with the result.
      NailgunProtocol.send_exit_with_code(self._socket, result)

      # Shutdown the connected socket.
      teardown_socket(self._socket)
    finally:
      super(DaemonExiter, self).exit(result=result, *args, **kwargs)
598101
void addOutput() {
        if( output != null ) {
            outputs.addLast( output );
        }
        output = state.pool.get();
    }
474301
def write(self, more):
        """"""
        if more:
            self.output += str(more).upper()
            self.output += '\n'
850898
def send_message(self, output):
        

        file_system_event = None
        if self.my_action_input:
            file_system_event = self.my_action_input.file_system_event or None

        output_action = ActionInput(file_system_event,
                                    output,
                                    self.name,
                                    "*")

        Global.MESSAGE_DISPATCHER.send_message(output_action)
940719
def _write_status_to_log(self, return_code, stream=sys.stdout):
        """"""
        stream.write("Timestamp: %i\n" % get_timestamp())
        if return_code == 0:
            stream.write("%s\n" % self._interface.string_successful)
        else:
            stream.write("%s %i\n" %
                         (self._interface.string_exited, return_code))
933230
def write(self, message, autoerase=True):
        """"""
        super(Animation, self).write(message)
        self.last_message = message
        if autoerase:
            time.sleep(self.interval)
            self.erase(message)
868758
public void writeMessageSetTo(final CodedOutputStream output)
                                throws IOException {
    for (int i = 0; i < fields.getNumArrayEntries(); i++) {
      writeMessageSetTo(fields.getArrayEntryAt(i), output);
    }
    for (final Map.Entry<FieldDescriptorType, Object> entry :
             fields.getOverflowEntries()) {
      writeMessageSetTo(entry, output);
    }
  }
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
563411
def _emit_message(cls, message):
        """"""
        sys.stdout.write(message)
        sys.stdout.flush()
642428
def finish(self, message: Optional[Message_T] = None, **kwargs) -> None:
        """"""
        if message:
            asyncio.ensure_future(self.send(message, **kwargs))
        raise _FinishException
33637
def write_message(self, message, timeout):
    
    with self._writer_lock:
      self._transport.write(message.header, timeout.remaining_ms)

      # Use any remaining time to send the data.  Note that if we get this far,
      # we always at least try to send the data (with a minimum of 10ms timeout)
      # because we don't want the remote end to get out of sync because we sent
      # a header but no data.
      if timeout.has_expired():
        _LOG.warning('Timed out between AdbMessage header and data, sending '
                     'data anyway with 10ms timeout')
        timeout = timeouts.PolledTimeout.from_millis(10)
      self._transport.write(message.data, timeout.remaining_ms)
660934
def write(self, data):
        

        self._process.poll()
        if self._process.returncode is not None:
            raise EOFError('Process ended')
        self._process.stdin.write(data)
1249465
def _output(self, message, verbosity, exact, stream):
        
        if exact:
            if self.config.verbosity == verbosity:
                stream.write(message + "\n")
        else:
            if self.config.verbosity >= verbosity:
                stream.write(message + "\n")
837125
def message(self, msg='', level=1, tab=0):
        ''''''
        if self.verbosity >= level:
            self.stdout.write('{}{}'.format('    ' * tab, msg))