What are the correct ways to use input streams in Java to read data from a file and store it in a byte array? Consider the following code snippet:
import java.io.*;
public class ReadData {
public static void main(String[] args) throws IOException {
File file = new File("input.txt");
byte[] bytesArray = new byte[(int)file.length()];
// What is the correct line of code to place here?
}
}