Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Avanish Raut

+ Follow
since Feb 20, 2001
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Avanish Raut

I am converting daylight savings time to Central Standard time. I tried using TimeZone and SimpleTimeZone but when I get the date in java.util.Date format it automatically reduces 1 hour if the date passed is switchOver date i.e. First Sunday of April at 0200 Hrs.
20 years ago
When I started, my code was like that way only. After that I observed that last 1024 bytes were not transfered properly. Thats the reason I changed my code like the way it is now.

Originally posted by Carl Trusiak:
I'm not sure where your problem could be. I've used the same thing Sun's FtpClient, BufferOutputStream and successfully sent files as small as 64 bytes. Post a code example and we'll see if we can help.

Here is the code, please let me know whats wrong with this code.

I added the UBB tags Code for easier reading. How to use UBB tags can be found Here
[This message has been edited by Carl Trusiak (edited February 22, 2001).]
I am using BufferedInputStream and BufferedOutputStream to transfer files in batches of 1024 bytes since the file size varies from 1024Byes to 500MB.
BufferedOutputStream is unable to write if buffer size is less than 1024 bytes. It transfers files with zero bytes.
It is working fine for file size > 1024 bytes
Any help will be appreciated.