Implement the following methods: 1. readBytes - must return all of the bytes in the fileName file. 2. readLines - must return all of the lines in the fileName file. Use the default encoding. 3. writeBytes - must write a byte array to the fileName file.
Your own implementation
You must be signed in to leave a comment
21 June 2021, 17:47
If working on this task in IntelliJ IDEA, make sure you turn off the 'Optimize imports on the fly' option in the Editor settings. Otherwise, you will be left with a List and IOException imports from the start and will wonder how the hell you're supposed to read/write to files with that :)
14 June 2019, 18:09
I really like this activity. It would be helpful to have something like this for every method in every new API that is covered.
12 January 2021, 14:11
15 June 2021, 07:04
Yeah, I really liked it too!