• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Transfering files from one Linux System to another

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I like transfer files from one Linux system to another, i know the easiest way is to use ftp.
is there any other way , that we could use to
transfer file from one Linux system to another using java
Thanks
Regards
Chandhrasekar Saravanan
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check Java Servlet Programming, O'Reilly, Jason Hunter.
There, I found very usefull code to implement a file transfer process. But following that experience, maybe you must consider another way to do that as MQ.

A.Perdomo.
 
Chandhrasekar Saravanan
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I couldnt understand what MQ is. could any one
suggest me whether there are any other ways we could transfer files from one linux system to other
I like to know what strategy could be used in transfering files from one linux to other
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You want to transfer a file between 2 linux machines. Does it have to be using Java?
If you can't use FTP, you could use SSH, or you can use NFS to mount one of the machines and create a virtual directory.
If you want to write it in Java, you would have a client that would probably take a command line name of the file, read it into a byte array, then connect a server conponent and write it across a stream through the socket connection. You could do this simply using an ObjectOutputStream.
The server component would create a ServerSocket, accept connections, read Objects from an ObjectInputStream, and write the data to disk using a FileOutputStream.
 
reply
    Bookmark Topic Watch Topic
  • New Topic