This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Copying JPG files from on server to another in Unix env Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Copying JPG files from on server to another in Unix env" Watch "Copying JPG files from on server to another in Unix env" New topic
Author

Copying JPG files from on server to another in Unix env

jasdeep parmar
Greenhorn

Joined: Oct 06, 2008
Posts: 20
hi,

I am copying, renaming a jpg file from one folder to another. I am able to do using FileImageOutputStream

File outFile = new File(destinationLoc+newName);
FileImageOutputStream output = new FileImageOutputStream(outFile);
writer.setOutput(output);
IIOImage image = new IIOImage(input, null, null);
System.out.println( "Writing " + 75 + "%");
writer.write(null, image, imagWritParam);

this works as long as the destinationLoc is on the same server but I am NOT sure how to pass destinationloc if I want to copy these files to other unix server on the network. I tried passing the url to that server and the file location but that doesn't work.

Does anybody know how can I do that, or please point me in direction where i can find resource to do that
thanks
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19649
    
  18

Depends what protocol you plan on using. Do you want to copy through Samba, FTP, NFS?

My advise would be to set up an NFS share on the machine to copy to, then mount it on the other machine. Then everything on that mounted NFS share appears to be local.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copying JPG files from on server to another in Unix env
 
Similar Threads
Image Compression
Graphics.drawImage not using specified background color
Copying JPG files from one server to another in Unix environment
copying files from one folder to another
Image smoothing