readAtMost
Reads at most len bytes from the file at the specified pos into the buf array.
Return
the number of bytes read, or -1 if the end of the file is reached
Throws
if an I/O error occurs
Reads at most buf.size bytes from the file at the specified pos into the buf array.
Return
the number of bytes read, or -1 if the end of the file is reached
Throws
if an I/O error occurs