Java Messenger File Transfer

We've made an instant messenger as our school project.

It has methods like getMSg, sendMSG etc. for sending messages from one client to another client.

But we also want to add file-transfer functionality to it.

So here is what I need:

1. Incoming File Transfer Handler: Recieves an Output Stream connected to another client and open file from local hard disk and send file using this output stream.

2. Outgoing File Transfer Handler: Recieves an Input Stream connected to another client and recieves file using this input stream, save it in local hard disk.

3. Supply 2 code fragments to show how to call above two handlers. These code-fragments will be integrated into existing getMSG and sendMSG methods.

To describe code-fragments, let me write pseudocode here:

if incomingMessageStartsWith("/send")


call incoming fileHandler(filename, filesize)


system.out.println"file transfer done");


Kemahiran: Java

Lihat lebih lanjut: java messenger file transfer, java messenger code file transfer, java messenger call, java client stream incoming file disk, transfer methods, project handler, java messenger write, file transfer project java, file transfer code java messenger, instant messenger send file transfer pseudo code, java messenger project file transfer, we stream, transfer, Pseudocode, open school, open file, java messenger, java file, file, file transfer, disk, connected, code java, java using, open input file

Tentang Majikan:
( 84 ulasan ) Plano, Canada

ID Projek: #34369