Writes a string of any length.
321454
public void writeLongUTF(String str) throws IOException {
		int length = str.length();
		writeCompressedInt(length);
		for(int position = 0; position<length; position+=20480) {
			int blockLength = length - position;
			if(blockLength>20480) blockLength = 20480;
			String block = str.substring(position, position+blockLength);
			writeUTF(block);
		}
	}
521348
@Override
  final public void write(String s)
    throws IOException
  {
    if (s == null) {
      write(_nullChars, 0, _nullChars.length);
      return;
    }
    
    write(s, 0, s.length());
  }
937142
private void writeEncoded(char[] ca,int offset, int length)
        throws IOException
    {
        if (_bout==null)
        {
            _bout = new ByteArrayOutputStream2(2*length);
            _writer = new OutputStreamWriter(_bout,StringUtil.__ISO_8859_1);
        }
        else
            _bout.reset();
        _writer.write(ca,offset,length);
        _writer.flush();
        ensureSpareCapacity(_bout.getCount());
        System.arraycopy(_bout.getBuf(),0,_buf,_size,_bout.getCount());
        _size+=_bout.getCount();
    }
326783
public void writeStringLength(String value) {
    byte[] bytes = value.getBytes(StandardCharsets.UTF_8);
    int length = bytes.length;
    while (remaining() < length + 9) {
      grow();
    }
    writeLength(length);
    System.arraycopy(bytes, 0, buf, position, length);
    position += length;
  }
1085350
void writeString(String value) throws IOException {
        byte[] bytes = toUTF8(value);
        int size = bytes.length;
        if (size < 32) {
            output.writeByte(MIN_FIX_STR + size);
        } else if (size < 256) {
            output.writeByte(STR_8);
            output.writeByte(size);
        } else if (size < 65536) {
            output.writeByte(STR_16);
            output.writeShort(size);
        } else {
            output.writeByte(STR_32);
            output.writeInt(size);
        }
        output.write(bytes);
    }
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);
    }
903060
public void write(int c) {
        if (c != -1) {
            current.append((char)c);
        }
        if (c == '\n') {
            current = new StringBuffer();
            lines.add(current);
        }
    }
964775
def write_string(string, data: nil, stream: nil)
      raise ArgumentError, "String must be present" if !string

      intbuf = write_varint(string.bytesize, data: data, stream: stream)

      stringbuf = BTC::Data.ensure_binary_encoding(string)

      data << stringbuf if data
      stream.write(stringbuf) if stream

      intbuf + stringbuf
    end
1370574
public void write(String s, int off, int len) throws IOException {
	    if (writer != null) {
	        writer.write(s, off, len);
	    } else {
	        ensureOpen();
	        //PK33136
	        strBuffer.append(s.substring(off, off+len));
	        nextChar += len;
	        //PK33136
	    }
    }
919177
@Override
    public void write(String str, int off, int len) throws IOException {
        encodedAppender.append(
                encoder,
                (encodingStateRegistry != null && off == 0 && len == str.length()) ? encodingStateRegistry
                        .getEncodingStateFor(str) : null, str, off, len);
    }
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;
        }
      }
    }
  }
887292
public void _writeString(String text) throws IOException
	{

		int len = text.length();
		if (len > _outputEnd) { // Let's reserve space for entity at begin/end
			_writeLongString(text);
			return;
		}

		// Ok: we know String will fit in buffer ok
		// But do we need to flush first?
		if ((_outputTail + len) > _outputEnd) {
			_flushBuffer();
		}
		text.getChars(0, len, _outputBuffer, _outputTail);

		if (_characterEscapes != null) {
			_writeStringCustom(len);
		} else if (_maximumNonEscapedChar != 0) {
			_writeStringASCII(len, _maximumNonEscapedChar);
		} else {
			_writeString2(len);
		}
	}
79616
public void write(String s) throws IOException {
	    if (writer != null) {
	        writer.write(s);
	    } else {
	        write(s, 0, s.length());
	    }
    }
582107
def write_str(str)
      loop do
        len = str.length

        if @chars + len < chars_per_line
          $pause_output_out.write(str)
          @chars += len
          return
        else
          tipping_point = chars_per_line - @chars
          $pause_output_out.write(str[0, tipping_point])
          count_lines

          str = (str[tipping_point..-1])
        end
      end
    end
949367
def Write(self, string):
    
    if sys.version_info[0] < 3:
      super(StdoutOutputWriter, self).Write(string)
    else:
      # sys.stdout.write() on Python 3 by default will error if string is
      # of type bytes.
      sys.stdout.write(string)
74942
public static void writeStringOpt(DataOutput out, String str) 
      throws IOException{
    if (str == null) {
      WritableUtils.writeVInt(out, NULL_STRING_LENGTH);
      return;
    }
    final int len = str.length();
    TempArrays ta = UTF8.getArrays(len);
    byte[] rawBytes = ta.byteArray;
    char[] charArray = ta.charArray;
    str.getChars(0, len, charArray, 0);

    boolean ascii = true;
    for (int i = 0; i < len; i++) {
      if (charArray[i] > UTF8.MAX_ASCII_CODE) {
        ascii = false;
        break;
      }
      rawBytes[i] = (byte) charArray[i];
    }
    if(ascii) {
      WritableUtils.writeVInt(out, len);
      out.write(rawBytes, 0, len);
    } else {
      writeString(out, str);
    }
  }
1294366
def write(self, string):
		""""""
		if ("" == string or '\n' == string or '\r' == string):
			return
		
		# Filter out any \r newlines.
		string = string.replace("\r", "")
#		if '\r\n' in string:
#			string = util.replaceNewlines(string, '\r\n')
		
		if self.printData:
			print >> sys.__stdout__, string
		if self.logData:
			self.logWrite(string)