I'm trying to find the best possible way to transfer a file from the server to the client. I am hoping to use this method:
- Client sends request for a file ( in the Server dir )
- Server locates the file
- File is buffered and sent through a stream one section ( ~3000 bytes ) at a time
- Client reads the stream and writes the file
My question is, what is the best existing way to do the process of sending. Reader -> Stream (server) Stream -> Writer (client) ? ObjectInputStream and then a socket stream? I'm very confused about this issue and if someone would be kind enough to shed some light on it, I would be very thankful.
