Write binary file data

@param filePath the file path to write
@param data the write
@throws IOException when IO error occurs
9574
public void writeFile(String filePath, byte[] data) throws IOException
   {
      Object lock = retrieveLock(filePath);      
      synchronized (lock) 
      {
         IO.writeFile(filePath, data);
      }
   }
841119
@Override
  public void write(byte[] b) throws IOException {
    for (OutputStream child : children) {
      child.write(b);
    }
  }
861510
public static void write(File file, byte[] data, boolean append) throws IOException {
        FileOutputStream stream = new FileOutputStream(file, append);
        try {
            stream.write(data);
        } finally {
            stream.close();
        }
    }
1259934
protected void write(BufferedWriter out, String type, byte[] data) throws IOException
    {
        writeHeader(out, type);
        out.write(this.base64.encode(data, 64));
        out.newLine();
        writeFooter(out, type);
    }
676682
@Override
    public void write(byte[] b) throws IOException {
        if (b.length == 0)
            return;
        fos().write(b);
        currFileBytesWritten += b.length;
        totalBytesWritten += b.length;
    }
922456
public static void write(byte[] data, File file) {
        try {
            write(new ByteArrayInputStream(data), new BufferedOutputStream(new FileOutputStream(file)));
        } catch (FileNotFoundException e) {
            throw E.ioException(e);
        }
    }
1294410
public void writeData(Object[] data, Type[] types) {
        writeData(types.length, types, data, null, null);
    }
1236199
public static void write(final Hml data, final File file) throws IOException {
        checkNotNull(data);
        checkNotNull(file);
        try (BufferedWriter writer = new BufferedWriter(new FileWriter(file))) {
            write(data, writer);
        }
    }
1238670
private void internalWrite(final byte[] data) throws IOException {
		if (!canBeContinued(data, policies)) {
			writer.close();

			String fileName = path.resolve();
			deleteBackups(path.getAllFiles(), backups);
			writer = createByteArrayWriter(fileName, false, buffered, false, false);

			for (Policy policy : policies) {
				policy.reset();
			}
		}

		writer.write(data, data.length);
	}
617759
public void write(byte data) throws IOException {
    fos.write(data);
    if(position + 1 > size)
      size = position+1;
    position+= 1;
  }
1259485
public static boolean writeStream(String filePath, InputStream stream) throws IOException {
        return writeStream(filePath, stream, false);
    }
418805
public void write_binary(final byte[] bin) {
        write1(OtpExternal.binTag);
        write4BE(bin.length);
        writeN(bin);
    }
534343
public void write(byte []buffer, int offset, int length)
    throws IOException
  {
    _file.write(buffer, offset, length);
  }
1196228
public static void writeBufferToFile(String path, byte[] buffer) throws IOException {
    try (FileOutputStream os = new FileOutputStream(path)) {
      os.write(buffer);
    }
  }
630269
public void write2File(String filePath) throws Excel4JException {

        try (FileOutputStream fos = new FileOutputStream(filePath)) {
            this.workbook.write(fos);
        } catch (IOException e) {
            throw new Excel4JException(e);
        }
    }
552041
private void writeBinaryFile(String path, InputStream is) throws IOException {
    zip.putNextEntry(new ZipEntry(path));
    try {
      IOUtils.copy(is, zip);
    }
    finally {
      zip.closeEntry();
    }
  }
74058
function writeFile(path, binary, callback) {
  mkdirp(nodePath.dirname(path), function (err) {
    if (err) return callback(err);
    nodeFs.writeFile(path, binary, callback);
  });
}