-
File Input Stream
Hi,
I have a problem.
I'm trying to read a file that has been submitted by other machine.
I would like to read and then make a copy of that file on my machine.
I'm able to do so on my local machine...i mean by submitting a file and opening it and them making a copy..(all on the local machine)
I'm using JSP.
FileInputStream fin=new FileInputStream(filename);
DataInputStream din = new DataInputStream(fin);
FileOutputStream fout=new FileOutputStream("C:/Demo/"+pathname);
int val;
while((val=din.read())!=-1)
{
fout.write(val);
}
-------------------------------------------------------------------
Please do help me.
Thanks in advance.
Cheers,
Lee
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks