How to send files like audio,video,images and text via RMI..

Hi everyone,
As I am working under a project, my own, of creating a chat machine, I've thought to make it capable of doing everything that MSN or yahoo MSN can do. Till now I've just been able to send messages and some small icons as expressions. So, my next step will be making my progam able to send even other files like audio, video, images and text to the person on the other machine to whom I'm chatting. But as I don't have any idea on how to start doing it, I want anyone who think he/she can help me to give me the basic logic that is used to do so. I would very much appreciate it. I've used vectors to store the text messages which is visible to all the users using the chat program enabling them to see various messages in it.
thank you...
Jay

Hi,
Now, I got stuck because the code doesn't seem to work well. For large files with around 40 mb or more size couldn't be sent. I have constructed the code, just rough sketch, as follows:
** In the Server Implementation class I've used FileInputStream to read the contents of a file that is sent as an argument to the method.
** Similarly, in the client side I've used RandomAccessFile to save the received array of bytes.
public void sendFile(File f)
   ChatServer cs=(ChatServer)Naming.lookup("rmi://localhost/ChatServer");
   cs.readsAndStoreTheFileInTheServer(f); // In the Server Implementation the contents of the file is read and saved in an array of byte. later method is invoked by the client to get the array of the saved byte.
   cs.message("-Accept-"); // When a client receives this word then a JComponent with accept and cancel button will be constructed from where other clients can save/cancel the sent file.
}For small size files this code works well but for files more than 40 mb of size it is useless. I wonder if there's any other alternative.
regards,
Jay

Similar Messages

  • How to attach files like .doc, .xls, .pdf  and so on in Design Editor (WYSIWYG)

    Hi,
    I want to attach files like .doc, .xls, .pdf. etc in my Design editor, instead of importing those files. Is there any way to do that. Please help.
    Thanks,
    Vinay Jaassiel Kankipati
    Technical Writer

    Hi Vinay.
    Would these files be editable and if so, where would they reside? If you want people to be able to edit the files, you need to consider where the files are located. If you link directly to a file in RoboHelp, a local copy is copied into your project as a baggage file. If a user then clicks on the link, the local copy is opened and any edits can not be saved back to the WebHelp's output location. However if you were to create an image (like the ones you used above) and added a hyperlink to the file's location - i.e. on a network drive outside the project, this would enable users to edit and save changes to the original file location. Hope this helps.
      The RoboColum(n)
      @robocolumn
      Colum McAndrew

  • How do I reformat the size of images and text on page to fit in normal full screen?

    Recently my computer crashed due to age. I can reboot the system and have done so reinstalling all programs using Windows. I have Firefox that I use but my homepage is set to aol as this is my email address. IT was on Sunday evening Dec. 26th that my computer was rebooted after having been out of commission for a month. I just did not have time to do it sooner due to holidays. My problem is that when I got my homepage, which was the Mozilla Get Started introductory page, the images were absolutely huge. I can see what I am supposed to, however, it looks like the images have been zoomed in so many times. I don't like this. I want my pages to display images as normal size for full screen mode. I have tried using the View tab and choosing the zoom option, but it does virtually no good-if I zoom out you can still see things like images but print is too tiny and blurry. Again, never have I enlarged the font, pics, or anything else for the matter. I like my settings on fonts to be standard (10-14) depending on what I am seeing. I don't understand why this happened. This is the first time I am seeing this issue ever and need help. If I want to see all of my page I have to scroll horizontally and vertically in order to see it all. I want to see it all at one time. I have never encountered this problem before. Can anyone help me? I would appreciate someone contacting me soon via email of [email protected] denoting to me an appointment time I can log on and get live chat help for this. Please let me know if this can be done or if I need to just try to live with it. Thank you for you help in this in advance and I look forward to hearing from my pals at Firefox because the staff have always been very helpful in past issues needing help on my end. Have a Happy New Year of 2011. By the way, I know that the box below has options of stating when this has happened and how many times, but I can say it has happened only once being now. I assume, and assumptions are slippery indeed, that if this happened now that it will in future times. So, for sake of answering the box below I will choose "once."

    Hit Ctrl+0 (That's a zero, by the way). I'm not sure if it will work, but hey, that's the first thing I would try.

  • How do I reduce the size of images and text?

    The text and images are too large. I cannot follow the so-called instructions on any of your pages.
    == This happened ==
    Every time Firefox opened
    == I downloaded Firefox

    Hit Ctrl+0 (That's a zero, by the way). I'm not sure if it will work, but hey, that's the first thing I would try.

  • Want to send a email with images and text in the body of email in iOS

    In iOS, we have written a code to send an email,  with embedded images and text in the body of the email ( not attachment) using mail composer. It works well with iOS devices like iPhone and iPad, but does not work in window based OS. Can anybody help. The code is

    Thanks James !, do you have an idea how to  find the window resource which I belive will be included in our appllication pack.
    In above  I have missed to copy the code,below is the code. This might help you to help me.
    NSMutableString *imgContent = [[[NSMutableString alloc] initWithString:@"<html><body>"] retain];
    UIImage *imageData = [UIImage imageNamed:@"Midhun.png"];
    NSData *imageDataInBase64 = [NSData dataWithData:UIImagePNGRepresentation(imageData)];
    NSString *base64String = [imageDataInBase64 base64EncodedString];
    [imgContent appendString:[NSString stringWithFormat:@"<p><b><img src='data:image/png;base64,%@'></b></p>",base64String]];
    [imgContent appendString:@"</body></html>"];
    MFMailComposeViewController *emailWin = [[MFMailComposeViewController alloc] init];
    [emailWin setMessageBody:imgContent isHTML:YES];

  • Appending data(Image and Text) to a file written with RTFWriter2.

    I have file witten using RTFWriter2 which contains image and text.I nedd to modify the contents of that file at runtime through browsing and selecting the JFileChooser and append the data to existing selected file.
    I write inot the file for the first time using FileOutputStream("filename",ture)
    where true stands for appending data to current file,if does noes have any/not.
    But this does not work when i write the file using RTFWriter2,and i have to use this RTFWriter2 b'coz writing an image to a file is not done by any other way.
    If there is any do let me know and if not then what is the solution to this problem of appending data to existing file written by RTFWriter2.
    Your repkeis will be appreciated.Thank You.

    Mubin_Ahmed wrote:
    Hi,
    I want to write an application which can be used to read a file that contains both images and text.
    It must separate the images and text and write them in separate files..
    Can anyone help me with this please...
    My email id is [email protected]
    Thanks in advance...This forum is to use as a resource for your questions, not a place to enlist someone to program for you. If you have specific questions on what to do, not: "I've not a clue, so explain the wold to me." But specific questions on how to get your code to work or points about Java, then people from all over the world will be happy to help you in the context of the forum, and not through your private e-mail. E-mail defeats the basic purpose of having public forums for learning and exchange of information.

  • How do I fix my audio/video in iChat 4.0.9?  it has worked perfectly until last night.

    How do I fix my audio/video in iChat 4.0.9?  it has worked perfectly until last night.  I have been having video calls iChat with my granddaughter for 4 weeks.  All of a sudden last night I wasn't able to complete the video/audio.  We were able to iChat with writing.  The message I got was to go to connection doctor.
    The error log -
    2011-04-24 19:33:43 -0400: No data has been received for the last 10 seconds.
    Audio channel info: local machine using 10.0.1.2:16402, expecting remote machine to send to 69.138.244.124:58521
    Video channel info: local machine using 10.0.1.2:16402, expecting remote machine to send to 69.138.244.124:58521
    Every time we tried to connect I got the same error message.
    I use an airport extreme - my granddaughter has some kind of wifi - but the error was on my side not hers as she connected to her friends.
    Please help.
    Thank you.

    Hi - I have a cable modem from comcast.
    I am not sure I understand all your questions, suggestions - so I will copy what I have when I go into the airport utility under internet.
    Do you have four tabs (You may have less)  I HAVE 4 TABS
    In the First tab what does it read at the Bottom ?  AT THE BOTTOM OF THE FIRST TAB (INTERNET CONNECTION) IT DOES SAY "SHARE A PUBLIC IP"  WHEN I LOOK AT THAT SETTING - I COULD CLICK INSTEAD BRIDGE MODE OFF, OR DISTRIBUTE A RANGE OF IP ADDRESSES.  BUT FOR NOW THE ONE THAT IT IS ON IS THE SHARE A PUBLIC IP.
    "Share a Public IP" ?
    Or "Bridge (Off) Mode" ?
    I DON'T UNDERSTAND WHERE TO LOOK FOR THE INFO BELOW.  I ALSO HAVE UNDER THE INTERNET CONNECTION TAB - CONNECT USING ETHERNET AND ETHERNET WAN PORT AUTOMATIC (DEFAULT)
    THE 2ND TAB IS TCP/IP AND THERE IT LISTS CONFIGURE IPv4: USING DHCP
    IP ADDRESS: 69.138.244.124
    SUBNET MASK  255.255.248.0
    ROUTER ADDRESS  69.138.240.1
    DNS SERVER  68.87.73.246  AND 68.87.71.230  (THESE ARE FILLED IN THE BOXES AND NOT CHANGEABLE.
    THE 3RD TAB IS DHCP
    DHCP BEGINNING ADDRESS 10.0 .1 .2
    DHCP ENDING ADDRESS 10.0.1.200
    DHCP LEASE IS 1  THEN DAY
    4TH TAB NAT
    CHECKED IS ENABLE NAT PORT MAPPING PROTOCOL
    I HAVE BEEN USING THIS AIRPORT EXTREME FOR AT LEAST ONE YEAR.
    THE ONLY DIFFERENT ISSUE IS THAT I HAD BEEN TRAVELING AND USED MY DAUGHTER'S AIRPORT EXTREME LAST WEEK.  I HAVE NO IDEA ANY OF THAT INFO - BUT I DO KNOW THAT THE AIRPORT EXTREME LISTED IN THE UTILITY IS THE ONE AT MY HOME THAT I AM WITH NOW.
    THANK YOU FOR TAKING THE TIME TO TRY TO HELP ME.  I REALLY APPRECIATE IT.
    JUDY
    Between that drop down and the tabs should be the info  on how it connects to the Modem.
    It may list that Puiblic IP.
    It may list another LAN IP (one from the Modem)
    Does it start 192.168....
    Or 172.16 (or up to 172.32....)
    Or possibly another 10.... number ?
    If the modem is issuing IPs to the LAN there are two things that can  effect things
    One is the fact the computer gets two IPs (even though the mac can only display one)
    And If you used Port Forwarding in the Modem the Place (IP/Computer or device) that it was pointing to may not be the Airport Base Station any more.

  • How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?

    How do I drag an image or text box to the "workspace" off of my working file but where I can still see the image and text box for future use?
    When I drag the item off of the trifold that I am creating, it just disappears but I still want to use it.  I just need to move it out of the way to modify other portions of the document.
    thanks,
    C

    Add another page below the current one to use as a storage area. You can't use the grey area around the page for storing items you want to use later.
    Go to the Pages Menu>Provide Pages Feedback if you would like to request this feature be added in future versions.

  • How To combine 2 PlayerPanel (Audio & Video) To only oneFrame

    How To combine 2 PlayerPanel (Audio & Video) To only one Frame ... By now I use Video Conference with IP Multicast and use 2 port numbers for Audio and Video .... But When I receive new Stream ... As a matter of fact It've 2 Stream , Rite ??? When I receive I have 2 Frame ( Audio and Video Frame)
    But That was not properly work ... That may take come confuse to user I wanna Grap 'em into one How can I do ??? Because of SSRC was created by Random method so SSRC cannot be indentify
    NuT

    dear NUT please send me the code for this video conferencing over lan with the multicast feature--i am in a great need of it urgently. The code you have already posted is having a great problem that Transmitter class contains the code for receiver class while the Receiver Class already contains the same code.
    Moreover the video we transmit, we also want to see over our own machine plesae send some suggestion regarding this thing--means we want to see two videos at a time one is our own and other is the streamed one.
    i know you would be a busy programmer but i am complled to ask you for help.
    please send me the right code over my email brecause it would become easy for me to reach My Email:
    <[email protected]>

  • How to transfer files like music from mac to ipad? tried it using mac but what happen was opposite!

    how to transfer files like music from mac to ipad? tried it few times but what happen was the opposite.

    If you want to sync your iTunes library on your Mac to your iPad ....
    Connect your iPad to the Mac and launch iTunes. Click on your iPad's name on the left side under the devices heading. Then click on the Music tab - and select the music that you want to transfer. Does your iTunes window look like this - with Sync Music checked and the playlists or albums checked as well like in the photo below?
    When you click on the apps tab do you have Sync Apps checked and all of the apps in the window below checked to sync as well?
    If you select all of the items under the different tabs in iTunes - music, apps, photos. etc. - when you sync - all of the selected content should sync over to the iPad.

  • Best way to send files like photos wireless from Macbook to iPhone/Ipad? And Then vice versa?

    What are the ways to send files like photos wireless from Macbook to iPhone/Ipad? And Then vice versa?

    Just one comment on this:
    ‘If I have, say, an older version of iPhoto but a newer version of one on my new Macbook Pro, will it still transfer photos no problem?’
    the problems are ALWAYS in the reverse way, when you have the newest (or a newer) version of a given app, and wish to transfer its library to an older version.
    Otherwise, see the link to Pondini.
    I have been using Martin Jahn’s iBackup, with which I have become accustomed and works fine. It also makes daily backups. Its advantage over other apps is that you may add whatever you wish to save, beside its default settings (which you may delete or cancel, of course, even if not recommended); it also has a friendly interface and easily customizable. Of course, this is a personal view, you may try other methods as well, or other backup apps. All are good if you are satisfied and correspond to your needs.

  • I was using photoshop CC as normal, when suddenly it started going haywire. It has corrupted all the one PSD files by distorting the images and colour. Does anyone know how to recover the original images?

    I was using photoshop CC as normal, when suddenly it started going haywire. It has corrupted all the open PSD files by distorting the images and colour. They are now completely unrecognisable and unusable. Does anyone know how to recover the original images as I was saving them as I went along but the files are now corrupt?

    What version of Photoshop are you running?
    I've seen a couple of instances over the last week or two where Photoshop has added masks, strange colours and also merged content from two separate PSD files that were open at the same time.
    This has occurred on two different iMacs, (both 10.10.x) running Photoshop CC 2014.2.2 (20141204.r.310 x64).
    see image below for example:

  • Changing images (and text) in InDesign file to spot color.

    Hi, Im trying to create a two color job in InDesign that will be black and red. The problem I have is that our imagesetter is not separating the colors.
    I was told that the red color needs to be a spot color in InDesign for the imagesetter to know to separate the colors. Otherwise, if the colors are not set as a spot color then it sends the file as CMYK separations or grayscale separations.
    The question I have is how can I change the images (and text) in my InDesign file to be set as a spot color? Thanks in advance.

    Please re-ask your question in the ID forum:
    Mike

  • When i Place a PSD in Indesign it comes in at 200+% while the image frame is considerably smaller. How do i place so that the image and image frame match?

    When i Place a PSD in Indesign it comes in at 200+% while the image frame is considerably smaller. How do i place so that the image and image frame match?

    Peter,
    The screenshots tell you everything.
    The second one tells you how the image frame is automatically set up after a one-click place. It's the blue stroked rectangle with the eight control points at each corner and mid-way along the line. This image frame is generated at a proportionally correct height and width for the image it contains.
    Now, if you look at the third screenshot (click on it to see it at a larger size), you will see I've used the direct selection tool (white arrow) to click on the image within the image frame. This CLEARLY shows the image (within the image frame) is substantially larger than the frame generated to contain it. This is indicated by the yellow stroked rectangle with the eight control points at each corner and mid-way along the line.
    Notice that the blue and yellow rectangles are vastly different sizes.
    In InDesign CS5.5, when i clicked to place the image, the image would fit perfectly within its image frame. the blue and yellow rectangles would match.
    I had no need to go click on the proportional fill and centre buttons like i need to do now in CC.
    I have a keyboard shortcut to place. I can't do File > Place for the amount of images i need to place.
    So to reiterate: How do i place an image so that the image and image frame match?

  • Audio Video Transmitting  and Receiving

    Can anybody help me...to do following task...
    I am doing some networking project where i need to send a video files from
    one system and play it on other system using RTP without storing it.
    I have seen some JMF example codes to transmit and receive videos but
    problem is that both audio and video streams of a video file are not been properly
    received or played back on receiving system ie for some files only audio is there and for
    some only video is there...
    I need to have some code so that both streams can be played together....
    can anybody suggest me to this so that i can implement this properly
    Its Urgent....

    Genius-java wrote:
    Its Urgent....In that case, it's probably too late to reply anyway. So sorry. Better luck next time!

Maybe you are looking for