write bytes into the file.
762252
def write_bytes(self, data: bytes, *, append=True):
        '''  '''
        mode = 'ab' if append else 'wb'
        return self.write(data, mode=mode)
198229
public static void append(File file, byte[] bytes) throws IOException {
        OutputStream stream = null;
        try {
            stream = new FileOutputStream(file, true);
            stream.write(bytes, 0, bytes.length);
            stream.flush();

            OutputStream temp = stream;
            stream = null;
            temp.close();
        } finally {
            closeWithWarning(stream);
        }
    }
739997
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;
    }
273298
public void writeBytes(byte[] buffer)
        throws IOException
    {
        if (buffer == null) {
            if (SIZE < _offset + 16)
                flushBuffer();

            _buffer[_offset++] = 'N';
        }
        else
            writeBytes(buffer, 0, buffer.length);
    }
108000
def write_bytes(self, data):
        
        if not isinstance(data, six.binary_type):
            raise TypeError(
                'data must be %s, not %s' %
                (six.binary_type.__class__.__name__, data.__class__.__name__))
        with self.open(mode='wb') as f:
            return f.write(data)
534343
public void write(byte []buffer, int offset, int length)
    throws IOException
  {
    _file.write(buffer, offset, length);
  }
819273
public static void writeBytes(byte[] bytes, OutputStream os) throws IOException {
		
		BufferedOutputStream bos = new BufferedOutputStream(os);
		
		ByteArrayInputStream bis = new ByteArrayInputStream(bytes);
		
		byte[] buf = new byte[1028];
		
		int len;
		while ((len = bis.read(buf, 0, buf.length)) > -1){
			bos.write(buf, 0, len);
		}
		
		bos.flush();
		bos.close();
		
		bis.close();
	}
356863
public void write(byte[] b) throws IOException
	{
		if (b == null)
			throw new NullPointerException();
		p.writeBytes(b, 0, b.length);
	}
1212
def write(self, chunk):
        """"""
        if self.chunked_write and chunk:
            chunk_size_hex = hex(len(chunk))[2:].encode('ascii')
            buf = [chunk_size_hex, CRLF, chunk, CRLF]
            self.conn.wfile.write(EMPTY.join(buf))
        else:
            self.conn.wfile.write(chunk)
60144
def write(self, data):
        """"""
        for chunk in chunks(data, 512):
            self.wait_to_write()
            self.comport.write(chunk)
        self.comport.flush()
1098921
def write(file_name, data):
    """"""
    with open(file_name, 'w') as f:
        f.write(encode(data))
774713
def write_bytes(out_data, encoding="ascii"):
    """"""
    if sys.version_info[0] >= 3:
        if isinstance(out_data, type("")):
            if encoding == "utf-8":
                return out_data.encode("utf-8")
            else:
                return out_data.encode("ascii", "ignore")
        elif isinstance(out_data, type(b"")):
            return out_data
    else:
        if isinstance(out_data, type("")):
            if encoding == "utf-8":
                return out_data.encode("utf-8")
            else:
                return out_data.encode("ascii", "ignore")
        elif isinstance(out_data, type(str(""))):
            return out_data
    msg = "Invalid value for out_data neither unicode nor byte string: {}".format(
        out_data
    )
    raise ValueError(msg)
998784
def write (self, s):
        
        if isinstance(s, bytes):
            s = self._decode(s)
        for c in s:
            self.process(c)
178749
public static void writeFile(File file, byte[] bytes) throws IOException {
        FileOutputStream fos = null;
        try {
            fos = new FileOutputStream(file);
            fos.write(bytes);
        } finally {
            if (fos != null) {
                fos.close();
            }
        }
    }
1363079
public static void saveBytes(@NotNull File file, @NotNull byte[] bytes) throws IOException
    {
        FileOutputStream stream = null;
        try {
            stream = new FileOutputStream(file);
            stream.write(bytes);
        } finally {
            if (stream != null) {
                stream.close();
            }
        }
    }
429243
def write(self, data):
        ''
        if not hasattr(data, 'read'):
            data = six.BytesIO(data)#StringIO(data)
        self.jfs.up(self.path, data)
952473
def write(self, word):
		
		bytes_ = int_to_bytes(word, self.width)
		self.open_stream_out.write(bytes_)