public static boolean byteArrayOutputStreamToFile(final ByteArrayOutputStream bos,final File targetFile,final boolean doAppend){
  if (bos == null || targetFile == null) {
    Log.e(FileUtils.class,"byteArrayOutputStreamToFile(): Null parameters given");
    return false;
  }
  return byteArrayToFile(bos.toByteArray(),targetFile,doAppend);
}

public static boolean byteArrayOutputStreamToFile ( final ByteArrayOutputStream bos , final File targetFile , final boolean doAppend ) { if ( bos == null || targetFile == null ) { Log . e ( FileUtils . class , "byteArrayOutputStreamToFile(): Null parameters given" ) ; return false ; } return byteArrayToFile ( bos . toByteArray ( ) , targetFile , doAppend ) ; }
writes a byte array to a file .
