I am trying to open a file and read 5 bytes each time.
In Python, we can use
fp = open('test.txt', 'r'); fp.read(5);
I have looked up many methods in Java. most of them can read line by line. Like
BufferedReader br = new BufferedReader(new FileReader("test.txt")); string s = br.readline();
So, is there any equivalent method in Java can read a file 5 bytes each time? Thanks!