Writes characters to the buffer.

@param aBuf
the data to be written
@param nOfs
the start offset in the data
@param nLen
the number of chars that are written
762365
@Override
  public void write (@Nonnull final char [] aBuf, @Nonnegative final int nOfs, @Nonnegative final int nLen)
  {
    ValueEnforcer.isArrayOfsLen (aBuf, nOfs, nLen);

    if (nLen > 0)
    {
      final int nNewCount = m_nCount + nLen;
      if (nNewCount > m_aBuf.length)
        m_aBuf = Arrays.copyOf (m_aBuf, Math.max (m_aBuf.length << 1, nNewCount));
      System.arraycopy (aBuf, nOfs, m_aBuf, m_nCount, nLen);
      m_nCount = nNewCount;
    }
  }
567445
public void writeLE(final long n, final int b) {
        long v = n;
        for (int i = 0; i < b; i++) {
            write((byte) (v & 0xff));
            v >>= 8;
        }
    }
1150776
public static void writeString(String string, ByteBuffer buffer) throws IOException {
        if (string == null) {
            buffer.putInt(VoltType.NULL_STRING_LENGTH);
            return;
        }

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

        buffer.putInt(len);
        buffer.put(strbytes);
    }
195009
public void write(char buf[], int off, int len) {
        try {
            synchronized (lock) {
                ensureOpen();
                out.write(buf, off, len);
            }
        }
        catch (InterruptedIOException x) {
            Thread.currentThread().interrupt();
        }
        catch (IOException x) {
            trouble = true;
        }
    }
11856
@Override
  public void write(char[] cbuf, int off, int len) throws IOException {
    if(len <= 0) {
      return;
    }
    // if we havn't last seen a newline, and don't get a CR, insert a newline.
    if(charsSinceNewline > 0) {
      if(cbuf[off] != CARRIAGE_RETURN) {
        super.write(NEWLINEC, 0, NEWLINEC.length);
        charsSinceNewline = 0;
      }
      else {
        // length of this line:
        int nonnl = countNonNewline(cbuf, off + 1, len - 1);
        // clear the existing chars.
        if(nonnl < charsSinceNewline) {
          super.write(CARRIAGE_RETURN);
          while(charsSinceNewline > 0) {
            final int n = Math.min(charsSinceNewline, WHITESPACE.length());
            super.write(WHITESPACE, 0, n);
            charsSinceNewline -= n;
          }
        }
        else {
          charsSinceNewline = 0;
        }
      }
    }
    charsSinceNewline = tailingNonNewline(cbuf, off, len);
    super.write(cbuf, off, len);
    flush();
  }
1327288
@Override
  public void write (@Nonnull final String sStr, final int nOfs, final int nLen)
  {
    m_aSB.append (sStr.substring (nOfs, nOfs + nLen));
  }
1312868
public void CreateBuffer(int nBytes, int nMaxDirectWriteBytes) {
        m_nMaxDirectWriteBytes = nMaxDirectWriteBytes;
        m_nTotal = nBytes + 1 + nMaxDirectWriteBytes;
        m_pBuffer = new byte[m_nTotal];
        byteBuffer = new ByteBuffer();
        m_nHead = 0;
        m_nTail = 0;
        m_nEndCap = m_nTotal;
    }
502987
public void writeByteBufferSparse(ByteBuffer buf, int nonEmptyBuckets)
  {
    writeByteBufferSerdeHeader(buf, SPARSE_ENCODING_MODE);
    writeByteBufferCommonFields(buf);

    buf.putInt(nonEmptyBuckets);
    int bucketsWritten = 0;
    for (int i = 0; i < numBuckets; i++) {
      if (histogram[i] > 0) {
        buf.putInt(i);
        buf.putLong(histogram[i]);
        bucketsWritten += 1;
      }
      if (bucketsWritten == nonEmptyBuckets) {
        break;
      }
    }
  }
609728
public static void writeAsciiString(AsciiString s, ByteBuffer buf) {
        short length=(short)(s != null? s.length() : -1);
        buf.putShort(length);
        if(s != null)
            buf.put(s.chars());
    }
1220881
protected void writeRaw(CharSequence seq, CharBuf buffer) {
        if (seq != null) {
            buffer.add(seq.toString());
        }
    }
971311
public void writeBytes(byte[] buffer, int offset, int length)
        throws IOException
    {
        if (buffer == null) {
            os.write('N');
        }
        else {
            os.write('B');
            os.write(length << 8);
            os.write(length);
            os.write(buffer, offset, length);
        }
    }
106973
@Override
    protected void writeRef(int value)
        throws IOException
    {
        if (SIZE < _offset + 16)
            flushBuffer();

        _buffer[_offset++] = (byte) BC_REF;

        writeInt(value);
    }
557807
private void _writeString(String text)
        throws IOException, JsonGenerationException
    {
        /* One check first: if String won't fit in the buffer, let's
         * segment writes. No point in extending buffer to huge sizes
         * (like if someone wants to include multi-megabyte base64
         * encoded stuff or such)
         */
        final 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 (_maximumNonEscapedChar != 0) {
            _writeStringASCII(len, _maximumNonEscapedChar);
        } else {
            _writeString2(len);
        }
    }
734414
@Override
  public void write (final int b)
  {
    final int nNewCount = m_nCount + 1;
    if (nNewCount > m_aBuf.length)
      m_aBuf = _enlarge (m_aBuf, Math.max (m_aBuf.length << 1, nNewCount));
    m_aBuf[m_nCount] = (byte) b;
    m_nCount = nNewCount;
  }
1057182
private void writeString(int fd, String s) throws IOException {
        if (s.length() > 0) {
            byte b[];
            try {
                b = s.getBytes("UTF-8");
            } catch (java.io.UnsupportedEncodingException x) {
                throw new InternalError();
            }
            BsdVirtualMachine.write(fd, b, 0, b.length);
        }
        byte b[] = new byte[1];
        b[0] = 0;
        write(fd, b, 0, 1);
    }
351011
public void write(String s,int offset, int length)
        throws IOException
    {
        for (int i=0;i<length;i++)
            _buffer.append(s.charAt(offset+i));
    }
858382
@Override
	public void write(final String string, final int off, final int len) {
		for (int i = off; i < off + len; i++) {
			write(string.charAt(i));
		}
	}