I have a 2 gb file I want to read in Java (actually four 2gb files). And so there\'s a new feature in Java 7 that can let me read all the bytes at once.
Reading byte by byte is the other extreme solution, and will be very inefficient. You should simply use a BufferedInputStream, and read the bytes chunk by chunk.