Results 1 to 4 of 4
  1. #1
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Exclamation Copying a file (.docx) from computers

    This thread is similar to this thread but I wanted to change the approach.

    The approach there is by using http. Is there a way to copy the same file from server to client (vise versa) and client to client? What methods or classes am I to utilize?


    Thanks.
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    Issue an HTTP GET to the server for the file and read the response.
    No way to do it client to client. It requires a server of some sort to handle the request and return the file.
    By client I mean code that opens a Socket to send a request. By server I mean code that opens a ServerSocket to receive a request.

  3. #3
    chyrl is offline Senior Member
    Join Date
    Mar 2010
    Location
    Manila, Philippines
    Posts
    257
    Rep Power
    5

    Default

    Ok. What methods am I to utilize to copy a file?
    Every project, package, class, method, variable, syntax, algorithm, etc.
    are registered in my memory bank. Thanks to this thread.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,556
    Rep Power
    23

    Default

    Search for 'Socket' for code examples. Also getInputStream(

Similar Threads

  1. Career Paths in Computers
    By Lil_Aziz1 in forum New To Java
    Replies: 26
    Last Post: 06-30-2010, 01:59 PM
  2. Sharing a game instance over two computers
    By keiys in forum Java Gaming
    Replies: 0
    Last Post: 04-21-2010, 02:39 PM
  3. problems copying a file
    By atom86 in forum Advanced Java
    Replies: 16
    Last Post: 10-01-2009, 02:40 PM
  4. Creating Folder in JAVA and Copying File
    By fnoman in forum New To Java
    Replies: 8
    Last Post: 10-18-2008, 07:33 AM
  5. Replies: 13
    Last Post: 01-09-2008, 06:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •