Maximum size of Bytearray

Can any one tell me the maximum size of Byte array.. i need to move the file and it around 50mb to 70 mb capacity and can please help me the code on this. i cant able to upload the large amount of files from one place to other..
[235 byte] By [wajeetha] at [2007-11-26 17:34:32]
# 1
http://forum.java.sun.com/thread.jspa?threadID=668210&messageID=3910284
roaha at 2007-7-9 0:02:32 > top of Java-index,Java Essentials,Java Programming...
# 2

The language will not allow any array to have a size greater than Integer.MAX_VALUE (2^31 - 1, about 2 billion). However, stricter limits will probably be imposed by the amount of memory on your machine, the OS's rules about how programs can allocate memory, and the startup parameters for heap size given to the VM.

In most cases, you should be able to handle 50-70 MB, provided you gave a big enough -Xmx argument to the VM at startup.

However, you do NOT need to (and should not) load the whole file into memory at once to copy or move it. EIther use File.rename, or read and write smaller pieces (a few k or tens of k) at a time.

jverda at 2007-7-9 0:02:32 > top of Java-index,Java Essentials,Java Programming...