Writes a raw string to the stream.
15932
def writeBytes(self, b):
        
        self.stream.write(TYPE_STRING)

        self.serialiseBytes(b)
154683
def writeString(self, s):
        
        s = self.context.getBytesForString(s)

        self.writeBytes(s)
640751
public static void writeToOutputStream(String s, OutputStream output) throws IOException {
		writeToOutputStream(s, output, null);
	}
644258
private void writeBufferedData() throws IOException {
        if (buffer.length() > 0) {
            out.write(formatMessage(buffer.toString()).getBytes());
            out.write('\n');
            buffer = new StringBuffer();
        }
    }
942229
public void writeRawBytes(final ByteString value, int offset, int length)
                            throws IOException {
    if (limit - position >= length) {
      // We have room in the current buffer.
      value.copyTo(buffer, offset, position, length);
      position += length;
    } else {
      // Write extends past current buffer.  Fill the rest of this buffer and
      // flush.
      final int bytesWritten = limit - position;
      value.copyTo(buffer, offset, position, bytesWritten);
      offset += bytesWritten;
      length -= bytesWritten;
      position = limit;
      refreshBuffer();

      // Now deal with the rest.
      // Since we have an output stream, this is our buffer
      // and buffer offset == 0
      if (length <= limit) {
        // Fits in new buffer.
        value.copyTo(buffer, offset, 0, length);
        position = length;
      } else {
        // Write is very big, but we can't do it all at once without allocating
        // an a copy of the byte array since ByteString does not give us access
        // to the underlying bytes. Use the InputStream interface on the
        // ByteString and our buffer to copy between the two.
        InputStream inputStreamFrom = value.newInput();
        if (offset != inputStreamFrom.skip(offset)) {
          throw new IllegalStateException("Skip failed? Should never happen.");
        }
        // Use the buffer as the temporary buffer to avoid allocating memory.
        while (length > 0) {
          int bytesToRead = Math.min(length, limit);
          int bytesRead = inputStreamFrom.read(buffer, 0, bytesToRead);
          if (bytesRead != bytesToRead) {
            throw new IllegalStateException("Read failed? Should never happen");
          }
          output.write(buffer, 0, bytesRead);
          length -= bytesRead;
        }
      }
    }
  }
1307003
static void writeString(FileWriter fw, String s) throws Exception
   {
      for (int i = 0; i < s.length(); i++)
      {
         fw.write((int)s.charAt(i));
      }
   }
240031
def write(self, out):
        """"""
        out.write_string(self.text, len(self.text))
420008
def writeBytes(self, s):
        
        l = len(s)

        if l > 0xffff:
            self.writeType(TYPE_LONGSTRING)
        else:
            self.writeType(TYPE_STRING)

        if l > 0xffff:
            self.stream.write_ulong(l)
        else:
            self.stream.write_ushort(l)

        self.stream.write(s)
103225
public static void writeStringAsText(DataOutput stream, String str) throws IOException {
    byte[] utf8Encoded = str.getBytes(StandardCharsets.UTF_8);
    writeVLong(stream, utf8Encoded.length);
    stream.write(utf8Encoded);
  }
677883
public void write(InputStream is, long length, boolean escape, boolean noBackslashEscapes)
      throws IOException {
    byte[] array = new byte[4096];
    int len;
    while (length > 0 && (len = is.read(array, 0, Math.min(4096, (int) length))) > 0) {
      if (escape) {
        writeBytesEscaped(array, len, noBackslashEscapes);
      } else {
        write(array, 0, len);
      }
      length -= len;
    }
  }
1095812
def _write(self, stream, text, byte_order):
        '''
        

        '''
        if text:
            self._write_txt(stream)
        else:
            if self._have_list:
                # There are list properties, so serialization is
                # slightly complicated.
                self._write_bin(stream, byte_order)
            else:
                # no list properties, so serialization is
                # straightforward.
                stream.write(self.data.astype(self.dtype(byte_order),
                                              copy=False).data)
38908
def write(self, string):
        """"""
        self._output += self._options.indentation_character * \
            self._indentation + string + '\n'
430547
def write(self, data, *, mode=None, buffering=-1, encoding=None, newline=None):
        '''  '''
        if mode is None:
            mode = 'w' if isinstance(data, str) else 'wb'
        with self.open(mode=mode, buffering=buffering, encoding=encoding, newline=newline) as fp:
            return fp.write(data)
1103999
void write(ByteCodeWriter out)
    throws IOException
  {
    out.write(ConstantPool.CP_STRING);
    out.writeShort(_stringIndex);
  }
195285
public static void write(String str, final OutputStream outputStream, Charset charset)
      throws IOException {
    new ByteSink() {
      @Override
      public OutputStream openStream() {
        return outputStream;
      }
    }.asCharSink(charset).write(str);
  }
100142
public void writeString(String string) throws IOException {
        if (string == null) {
            writeInt(VoltType.NULL_STRING_LENGTH);
            return;
        }

        byte[]  strbytes = string.getBytes(Constants.UTF8ENCODING);
        int len = strbytes.length;

        writeInt(len);
        write(strbytes);
    }
835768
public void dumpTo(OutputStream out)
    {
        PrintWriter writer;
        try {
            writer = new PrintWriter(new OutputStreamWriter(out, "utf-8"));
        } catch (UnsupportedEncodingException e) {
            writer = new PrintWriter(out);
        }
        recursiveDump(root, 0, writer);
        writer.close();
    }