Results 1 to 4 of 4
  1. #1
    shwein is offline Member
    Join Date
    Sep 2008
    Posts
    38
    Rep Power
    0

    Default client-server app

    hey, im a newbie with programming and im working on a networking program.
    question: what stream should i use for sending a file from a client to a server app ?
    example;
    File file = filechooser.getSelectedFile();
    i want to send file to my server app...
    thx

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Is the file bytes or characters? There are different classes depending on which. Characters can go thru a conversion.
    Use an OutputStream for bytes and a Writer for characters

  3. #3
    shwein is offline Member
    Join Date
    Sep 2008
    Posts
    38
    Rep Power
    0

    Default

    suppose i want to send all kinds of files(audio(bytes?),text(char?),...), depending on the user's choise, should i make object from/for these files(if yes, then how?) before i can send them to the client?
    thx :)

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,902
    Rep Power
    25

    Default

    Not sure what "make object" means.
    To access files on disk,you must use some kind of file object to read them.

    If you read bytes and write bytes on both ends, the output file on the client should be the same as the input file on the server.

Similar Threads

  1. Replies: 1
    Last Post: 10-05-2008, 04:12 PM
  2. Server not able to connect client
    By Kapil Gupta in forum New To Java
    Replies: 15
    Last Post: 07-22-2008, 05:09 AM
  3. client/server palindrom
    By Rgfirefly24 in forum New To Java
    Replies: 0
    Last Post: 04-28-2008, 03:19 AM
  4. Identify Client in Socket Client Server Application
    By masadjie in forum Networking
    Replies: 1
    Last Post: 12-20-2007, 10:18 AM
  5. Problems with client and server
    By Albert in forum Advanced Java
    Replies: 2
    Last Post: 07-02-2007, 07:07 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
  •