Idea for Chat Socket (what�s the best maner to send model class?)

I Hava a server/client chat socket. Multitreading to recieve multi-conections. I have a model style class, like a Message, that you send this class for exemplo from Client to Server.
Message Class
* name as String
* msg as String
I used ObjectStreams like ObjectOuputStream and ObjectInputStream to send and receive this object liked. But I need to serialize this model class to send it. Is the best maner to use Object Strams, or have another easy solution to send this class model??
I demand ideas!
Thanks all!

If you are communicating serializable objects between Java clients then sure, ObjectOutputStream & ObjectInputStream are a pretty easy way of doing that.
One downside is that OOS & OIS are difficult to use in non-Java programs. If you want interoperability with other languages you might communicate using e.g. CORBA, XML, or a protocol of your own design. Those require a bit more work and learning though.

Similar Messages

  • I would like to create pages for our yearbook what is the best software

    I would like to create pages for our yearbook what is the best software - pages does seem limited.

    fruhulda wrote:
    Network 23 wrote:
    Keynote...it could make a book, but it's probably questionable whether you'd want to manage hundreds of pictures and lots of pages with it.
    Why is that questionable?
    Because Keynote does not have the industrial-strength tools to handle long form text and large numbers of graphics. When you make a long or complex document, you sometimes have to go in and fix problems in bulk, like text formatting, or updating graphics, or finessing the layout on 200 pages, things like that. A program like InDesign can deal with it through things like paragraph styles, character styles, table styles (not one-off styles, but the kind that let you update a style name and have all text that uses that style update across all pages), or a powerful link manager that lets you keep graphics outside the document so you can easily update them by reference, in bulk if needed. InDesign also has some great tools like the ability to import multiple photos at once and have them place on the layout as a nice yearbook-style grid, the instant they land on the page, without having to arrange them after they come in.
    Finally, an app like InDesign knows how to print to a commercial press, or how to produce a press-ready PDF. Keynote has no idea.
    A yearbook can run a couple hundred pages and involve hundreds of photos. I would not touch such a project with anything that wasn't truly up to the task. The best software would be InDesign or QuarkXPress. Word is not good enough. Pages is not good enough. You will tear your hair out as you fix problems on page after page, photo after photo. Keynote would probably be laughable for a yearbook. I use Keynote for presentations, Keynote is the best at what it does. A yearbook is nothing like a presentation.

  • Using Microsoft Exchange to access Gmail (Google Apps for Business) contacts, what is the best way to sync the Corporate Directory?

    Using Microsoft Exchange to access Gmail (Google Apps for Business) contacts, what is the best way to sync the Corporate Directory? For instance, we have 40 staff members and wish to populate each phone with the Gmail profile. Right now we have a third party Android app that does this and copies my contacts to each phone. This is problematic. Any solutions to populate a phone with email and phone contacts? Even it it requires double entry for me...thats ok.

    Oh, I meant Leopard does do more than Tiger Server.
    I don't know enough about Server, even less abut Syncing.
    SL is to new, not enough time to iron out the kinks yet imho.
    One day SL will be better than Leo, but...
    I'd ask over in server...
    http://discussions.apple.com/category.jspa?categoryID=96
    Or perhaps Collaboration Services...
    http://discussions.apple.com/forum.jspa?forumID=1352
    They may even have a different opinion on SL.

  • What's the best Word Prosseing app for IPad 2, what's the best Word Prossing app for IPad 2

    what's the best Word Prosseing app for IPad 2, what's the best Word Prossing app for IPad 2

    Have a look at the following (in my order of preference)
    http://itunes.apple.com/sg/app/quickoffice-pro-hd-edit-office/id376212724?mt=8&l s=1
    http://itunes.apple.com/sg/app/documents-to-go-premium-office/id317107309?mt=8&l s=1
    http://itunes.apple.com/sg/app/office2-hd/id364361728?mt=8&ls=1

  • What is the best start  powermac g4 model numberm8570?how can i make this model perform at its peek?

    what is the best start up disk for powermac g4 model number 8570 ?how can i optimize peek up to date performance for all categories on line for free

    DubbleDueces wrote:
    what is the best start up disk for powermac g4
    There is no "best", there is only the one Apple included with it.

  • Acrobat Standard XI, but can only find the CD for windows.  I have a mac (I have access to an external CD drive and I have the product keys for windows).  What is the best way for me to install it?

    Hi, I purchased Acrobat Standard XI, but can only find the CD for windows.  I have a mac (I have access to an external CD drive and I have the product keys for windows).  I have never installed it anywhere else.  What is the best way for me to install it?

    Hi lintonm86921521,
    I can understand your concern & will guide you through this.
    I am so sorry to inform you that Acrobat XI Standard is not available on Mac, you can only use it on your Windows computer.
    You can also refer to the system requirements at : System requirements | Acrobat family of products—older versions (XI, X, 9)
    In case if you have any further query please let us know, we will be happy to help you.
    Regards,
    Aadesh

  • For optimal sound, what is the best way to connect an iMac to a high end stereo system?

    If the answer is wired rather than through an Airport Express, what is the best way to wire an iMac to a good stereo? Is there any way to do it other than through the headphones out jack?

    Morning Acousticare,
    Thanks for using Apple Support Communities.
    Thunderbolt cables should not exceed three meters for maximum performance. The Apple Thunderbolt to Thunderbolt cable (2.0 m) is two meters in length.
    For more information on this, take a look at this article:
    About Thunderbolt to Thunderbolt cable (2.0 m)
    http://support.apple.com/kb/HT4614
    Hope this helps,
    Mario

  • What is the best  way to send one email for 2000+ address?

    Hi I want to send oneemail msg (only text) from mor than 2000 address.
    I want that the recp. will not c the other address (i. e. each address should be a BCC)
    what is the best way to do it? sned 2000 emails or to send 20 emails with 1000 recp. ?
    is there any limitation on the number of recp in BCC?
    10x alot Yonatan

    is there any limitation on the number of recp in BCC?
    mail server you are using may be the limiting factor. However, most mail server handle 2000 recp. You will get smtp error 552 if the mail server cant handle 2000 recipients.

  • HT2534 I have two class sets of iPad 2s and I would like to set up an iTunes account but don't want to put in my credit card information or individual students' information. What is the best way to set up class sets of iPads?

    I am a K-6 tech teacher and just recieved two classroom sets of iPads. I'm wondering what is the best way to set up iTunes so that apps may be downloaded. I do not want to put my personal information in and I do not want students to put in their informtion either. Teachers want to be able to download free apps and when the school purchases iTunes gift cards, they would like to be able to use them. What is the best way to go about this?
    Thank You!
    Jess

    Contact your IT person. They will help you with provisioning & setting up the iPads and getting apps on them and locking them down so students can only access certain settings and apps.
    I have asked that this post get moved to iPad Enterprise as it is more approriate forum for your question (even though it is about schools))
    Don't create an AppleID yourself and use it to put stuff onto the school iPads. You can't have more than 10 iPads to one iTunes account anyway.

  • What is the best way to send a file?

    i am writing a program and i want to transfer a file from a client class to a server class... what is the best way to do that?
    convert the file to bytes using the following
    File file=new File("jobs.xml");
               byte buffer[]=new byte[(int)file.length()];
               try {
                    BufferedInputStream input=new BufferedInputStream(new FileInputStream("jobs.xml"));
                    input.read(buffer,0,buffer.length);
                    input.close();
               } catch(Exception e) {//DIORTHOSE TA MSGS
                  System.out.println("reading jobs.xml->buffer: "+e.getMessage());
                  e.printStackTrace();
               firstServerRef.translationService(theCallbackObjectRef, buffer);for a reason i dont like that i am reading the file again to put it in the buffer and send the buffer... are my worries reasonable or not? is there any other better way to do that?

    Use a smaller buffer, repeatedly read and
    write, and print the exception's stack trace.
    What do you mean by reading again, by the way? I only
    see you reading the file once.hmm you mean use a smaller buffer and call the function with the smaller buffer many times in a while?
    the client and the server are not on a single machine and i want to call the function only once... could you clarify the thing that you said..
    yes you are correct that you see only one reading because i haven't pasted the rest of the code which is sth like...
    FileWriter fw = new FileWriter("jobs.xml");
               ObjectOutputStream out = xstream.createObjectOutputStream(fw);
         //      out.writeObject(new Jobb("ougk2", "Walnes",null));
              for(int i=0;i<nameOfServices.length;i++){
                   Jobb translationJob=new Jobb();
                   //find the service !
                 NameComponent nc = new NameComponent(nameOfServices, " ");
    // Resolve the object reference in naming
    NameComponent path[] = {nc};
    //create a ref for the servant of the service
    ServiceOperations theRemoteObjRef = ServiceHelper.narrow(ncRef.resolve(path));
    // JobOperations theRemoteObjRef = JobHelper.narrow(ncRef.resolve(path));
    translationJob.setObjServerRef(theRemoteObjRef.toString());
    if(i==0){ //this is the first job
         translationJob.setForTranslation(wordForTranslation);
         firstServerRef=theRemoteObjRef;
         out.writeObject(translationJob);
         out.close();
         File file=new File("jobs.xml");
              byte buffer[]=new byte[(int)file.length()];
              try {
                   BufferedInputStream input=new BufferedInputStream(new FileInputStream("jobs.xml"));
                   input.read(buffer,0,buffer.length);
                   input.close();
              } catch(Exception e) {//DIORTHOSE TA MSGS
         System.out.println("reading jobs.xml->buffer: "+e.getMessage());
         e.printStackTrace();
              firstServerRef.translationService(theCallbackObjectRef, buffer);
    which i believe is bad....

  • What is the best way to send multiple pdf files to my ipad

    what is the best way or app to send multiple pdf files to my ipad, so that I can then combine them into one folder

    I have the app Readdle Docs. It allows you to move PDF files to your device and to move them around on your device. Might check it out. ( I think there's an iPad version of the app, but I have the iPhone version and it works, just not as pretty)
    THere's also Goodreader, but I don't have experience with it to know if it has folder abilities.

  • What's the best way to send multiple photo's to another iMac

    My friend has an iMac and they are trying to send multiple photo's to my iMac.  Can anyone let me know the best method to send them please.

    AdamTurner333 wrote:
    My friend has an iMac and they are trying to send multiple photo's to my iMac.  Can anyone let me know the best method to send them please.
    Unless these are very small photos or few in number they should use a sharing service, DropBox is good but there are many others.

  • What's the best way to send photos to a PC user?

    I'm new to the Mac world and need to know the best way to send photos to a PC user.

    Most if not all email have "Attachments" listed in the email menu.  Just click on it & follow the onscreen instructions.  Very simple. 

  • What's the best way to send uncommon sized images for printing?

    One of the things I need to do occasionally is print an uncommon sized image. For example, I may crop part of an image as a 2x3 to fit in an odd picture frame, such as a Chrstimas ornament. However, most places I print (e.g. CVS) only print common sizes. In the past I've used Elements to create a blank new image in a common size and pasted my crop into it (which is a little tricky because you have to make sure the new image and the crop have the same resolution), but I'd like to be able to do this directly in Lightroom. What would be the best way to do this?

    1. Crop the image to the aspect ratio you want. If you wish to retain the cropped version for future use, make a Virtual Copy of it.
    2. In the Print module set the page size to the size you will be ordering from the lab.
    3. Make the cell dimensions the size you want the image to be. Set the margin sizes to position the image on the page as you wish.
    4. Set Print to: JPEG File, Resolution to 300 ppi, check Sharpness, set JPEG Quality and the color space to sRGB.
    5. Click on Print to File.

  • What is the best way to maintain models with common components?

    I work for a company that uses MatrixX/SystemBuild (v62.2) to build functional models of trains for use in driver training simulators.  We are currently in the early stages of a project in which we will need to build and maintain multiple train models which are likely to have some common components, but may have some significant differences.  Before we get too far into the modelling, I would like to come up with a decent method of maintaining the common components while keeping the differences separate.
    Ideally, I would like to find a way of quickly and easily determining the difference between two models and a way of conditionally pushing the differences from one model to another - in a similar way that one might diff two text files and conditionally copy the changes in one to another.
    I found a script (mx_62.2\sysbld\scripts\compare_catalogs.msc) that seems to accept two catalogs for comparison, outputing a difference log. However, I'm unsure how to use this as I don't know how to load two catalogs within the same instance of Xmath or how to assign a catalog to a variable for passing in to a function.  Does anyone know how to use this script?
    I am also thinking that it might be useful to be able to convert a catalog to an xml - I can probably write a script to do this, however I am wondering if there's anything freely available to do this.
    Does anyone have any other ideas?

    Let me first discuss about comparing models, then I'll talk about my ideas about modularization.
    Comparing models in anything before v8 is difficult. In v6 or v7, there's no way to load to separate files containing the same yet different superblocks. The tool scripts you found don't seem to be documented anywhere. Given the history of some of the things added into the product, I'm not surprised. Which means that it's useless to us. After looking at the scripts, it's difficult to figure out what the inputs to that script should be. You can launch multiple instances of xmath/sysbld and load the models separately, but that's about it.
    One suggestion if you have to compare models is to use the exportcatalog.msc script which will generate a text file containing the SBA commands to re-create the model. Do the same for both models then perform a text difference between the generated SBA commands in the generated files.
    Another possibility is to use SBA to get the details of each superblock (similar to exportXXX.msc scripts) into a form that's easier to compare between. I'm going to guess that some kind of generated SBA content is the expected input to the compare_catalogs, but I'm not sure.
    Now, within v8, we've created a hierarchical compare tool, that compares model files and shows differences. Copying changes between the compared models is a future enhancement. However, in the context of using v8, you could manually copying the changes between the models using the editor and/or project system as appropriate. Yes, in v8 you can separately load models containing the same named superblocks. Try it, I'll bet you'll like it and it will save you lots of time!
    Now, on to modularization. I'm not sure you're use of 'components' is the meaning of the Components feature in Sysbld or not. I'm going to assume that you are not using Components and you're generically using the term components as a set of logically related superblocks, or as I perfer to call them, a module.
    The only modularization tool you have in Sysbld is the file. What I mean here is that you are able to group sets of superblocks into separate savefiles (.sbd) then combine them to create a complete model. So, essentially, you will need to partition your model into modules and each module is a separate savefile. Then, you can choose which module (i.e. savefile) to load to construct a complete model.
    In v8, there's a project system specifically designed to make this kind of modularization within a project easy and straightforward to use and maintain. I'd suggest that you use v8.
    For previous versions, the best you can do is create xmath scripts for each complete model you need. The script will contain all of the steps needed to load the separate modules to make a complete model. Thus, you'd have a different script for each model. Also, becareful in v6,v7 that you'll have to manually manage which superblocks are part of which modules, it's tricky stuff. Again, you'll need to use scripts to help maintain this level of complexity in these versions of the Sysbld.
    Now, I do not want to recommend FileSuperBlocks, it's a legacy feature to deal with limited resources not applicable on today's machines.
    Also, I can't really recommend the the Component feature in Sysbld. It's really not a component, but more of an object, sort-of. And it sort-of gives you unique names and it sort-of gives you parameters. It will not help with the modularization I think you want so don't use these.
    In general, there are features within our latest v8 release of MATRIXx that will help you with all of your issues. If you can, upgrade!
    Bob Pizzi
    MATRIXx R&D

Maybe you are looking for

  • How can I export swf that calls a flv to avi?

    I have a Flash movie that uses Actionscript 2.0 to trigger animations.  The swf and flv files are separate though - the flv is called by the swf.  There are cues in the flv that fire Actionscript events.  How can I get the whole thing to export?  I c

  • N97 Mini - problem autolock with security code

    I bought my N97 Mini last week. It works perfectly except when I activate autolock with securitycode, the phone refuses to react, when the autolock is activated of course. Only when I remove the battery I can reboot my phone. I've contacted both the

  • How to connect ipad to internet over Windows box on ethernet connection

    Due to available infrastructure, I would like to use internet (if it is possible) on my iPad over Windows box connected to internet. Is there any solution? THX Duke

  • Check receipt tab in FBCJ

    Can we receive cheques through FBCJ through check receipt tab. When the present check tab and check lot will be useful. Check receipt process in FBCJ. Ofcourse, check receipts through FBCJ needs again clearing in F-32.

  • HT1338 Error applying update - MacBook Pro - OS 10.6.8

    The update consists of the Airport Utility v 5.6.1, Java for OS X 10.6 Update 9 v 9.0, and iTunes v 10.6.3.  It downloads all the files but quits with unexpected error.  Prior to that message it says something like "Waiting for other installations to