This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
Since the Java Language Specification says the argument to an array creation expression is an int and the largest int value is 2,147,483,647, I'd say that is the largest allowable array size. Are you certain that length == bytes.length? Your downcast from long to int could lose the most significant digit.
Maybe you should load the file into the byte array in parts. Basically the buffer "byte " can be flushed after loading say, every 256K of the file. I faced a similar problem sometime back too and flushing the byte array solved it.