This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Originally posted by vinod perla: using InputStream I think it is not possible to upload a file which is greater than 2.14GB
There is no size limit on a stream. If there is any size limit, it is determined by the operating system or the file system and no amount of magic at the application level will get around it (see here for a comparison of file system capabilities). Using NIO will not get around any limitation, if one exists. The stream-style classes are implemented using NIO (that's why there's a channel available in the InputStream). NIO still has to obey limits set by OS and file system parameters. Have you tried to upload an 8GB file? If so, what errors did you see? What OS/file system is the destination system? [ March 23, 2007: Message edited by: Joe Ess ]
Originally posted by Joe Ess: Have you tried to upload an 8GB file? If so, what errors did you see? What OS/file system is the destination system?
I've used Jakarta Commons Net 1.4.0 API and I tried uploading a file of size 8GB to a FTP server, after transferring 2.14GB I'm getting a CopyStreamException.
I tried uploading manually the same file through FTP PUT command it uploaded successfully.
Joined: Jan 06, 2005
Originally posted by Rahul Bhattacharjee: When we talk of byte streams , then size really doesn't matter as streams are like byte pipes. You program might be failing because of lack of disk space at the other end.
There is enough disk space at FTP Server. When I tried uploading the same file through FTP PUT command it uploaded successfully.