Results 1 to 3 of 3
  1. #1
    ddj
    ddj is offline Member
    Join Date
    Mar 2009
    Posts
    2
    Rep Power
    0

    Question tcp file transfer

    hey al...wrote a tcp java pgm to send files in net beans(JFrame)...
    the problem is only a part of the file is getting sent...
    i.e. if the original file size is 1kb the sent file is only 0.5kb...
    am not able to open the file also...
    can any1 plz help???
    very urgent!!
    Last edited by ddj; 03-16-2009 at 08:02 PM.

  2. #2
    tommosimmo is offline Member
    Join Date
    Mar 2009
    Posts
    6
    Rep Power
    0

    Default

    What sought of reader are you using? Is it buffered? Please show your code for more help.

  3. #3
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Posts
    1,046
    Rep Power
    8

    Default

    Transmission Control Protocol... Netbeans IDE... JFrame GUI component... File...

    None of these really go together. If you are using some form of output stream, make sure you close it properly. This will also flush it. If you are using a socket, make sure you read the entire message on the receiving end. It may require multiple reads before all the bytes are transferred.

Similar Threads

  1. To transfer a file from client to server
    By phani in forum Networking
    Replies: 4
    Last Post: 10-12-2010, 07:15 PM
  2. file transfer
    By prashant in forum Networking
    Replies: 3
    Last Post: 12-10-2009, 07:46 AM
  3. Applet > servlet file transfer
    By milkman128 in forum Java Applets
    Replies: 1
    Last Post: 11-15-2008, 04:21 PM
  4. Java File Transfer
    By lks0912 in forum Advanced Java
    Replies: 0
    Last Post: 10-23-2008, 01:53 PM
  5. File and Message transfer over sockets!
    By rameshraj in forum Networking
    Replies: 3
    Last Post: 05-14-2008, 09:13 PM

Posting Permissions

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