Both the RandomAccessFile and InputStream objects have the ReadBytes method. If I want to read a binary file stored in my device into an array of bytes, which object is better?
I am also confused by the fact that ReadBytes doesn't guarantee to always return the number of bytes requested. Where does this randomness come from? Are both RandomAccessFile and InputStream vulnerable to this problem when reading a local binary file?
Thanks!
I am also confused by the fact that ReadBytes doesn't guarantee to always return the number of bytes requested. Where does this randomness come from? Are both RandomAccessFile and InputStream vulnerable to this problem when reading a local binary file?
Thanks!