saveToFile

open fun saveToFile(@NonNull file: File)

Saves the received data to the specified File

Parameters

file

The file to save the data to

Throws

If an I/O error occurred: No such file, file is directory, etc


open fun saveToFile(@NonNull file: File, @Nullable sha1sum: String)

Saves the received data to the specified File and verifies its integrity using the specified sha1sum

Parameters

file

The file to save the data to

sha1sum

checksum to check the file's integrity. May be null to skip integrity check

Throws

If an I/O error occurred: No such file, file is directory, integrity check failed, etc