code: public void write(byte[] bytes, int offset, int len)
      {
          if (bytes == null)
          {
              return;
          }
          if ((offset < 0) || (offset > bytes.length) || (len < 0) || ((offset + len) - bytes.length > 0))
          {
              throw new IndexOutOfBoundsException("offset=" + offset + ", len=" + len + ", bytes.length=" + bytes.length);
          }
          ensureCapacity(size + len);
          System.arraycopy(bytes, offset, buffer, size, len);
          size += len;
      }
docs: Writes <code>len</code> bytes from the specified byte array
  starting at offset <code>off</code> to this stream.
  
  @param bytes byte[] the data to write to this stream.
  @param offset the start offset in the data.
  @param len the number of bytes to write.