I need to read .doc, pdf, gif and .jpg files from one location and upload to some other location in my system or some other system in the .
Can someone give me the sample java code how to do it.
Thanks in advance Rashmee [ June 13, 2008: Message edited by: Rashmee H S ]
Joined: Feb 03, 2005
Hello, your question is very general in nature. Uploading to some other location in your system would mean copying that file to the other location. The File I/O API's in Java would be the place you want to look for that. For uploading to some other system in the network, the ways are many. It depends on the protocols you want to use, could be FTP, HTTP, SMB etc. Quite a few JDK and third party libraries are available for this.
Try referring the JDK API's, Apache Commons (File-Upload for you), JCIFS etc. You can google for these terms and get the right hit. Also try the simpler case of copying to another location on your system first.