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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com