I read a tutorial 'Read file in String with BufferedInputStream', and I got a code from here:
The question is this line:
// byte array to store input
byte[] contents = new byte[1024];
So, how can I ensure it is 1024 byte? If I have a data with 1025 byte, and my code will break. So, how can I make it more generic? Thanks.