code: public void writeFile(String filePath, byte[] data) throws IOException
     {
        Object lock = retrieveLock(filePath);      
        synchronized (lock) 
        {
           IO.writeFile(filePath, data);
        }
     }
docs: Write binary file data
  
  @param filePath the file path to write
  @param data the write
  @throws IOException when IO error occurs