public static void writeByteArrayToFile(File file, byte[] data){
        try{
            writeByteArrayToFile(file, data, false);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
Writes a byte array to a file creating the file if it does not exist.
<p>
NOTE: As from v1.3, the parent directories of the file will be created
if they do not exist.

@param file  the file to write to
@param data  the content to write to the file
@since 1.1
agent/src/main/java/code/landgrey/copagent/utils/PathUtils.java