Turing an object into a byteArray and getting ti again

Hi, is there any way to do transform an Object like a String array and then get that object again.
I must send data from a server to a mobile device and then I want to reconstruct the object again on the device.

Well, I am afraid that was helpless, because I could
send the Object using an ObjectOutputStream but those
Streams are not avaible in the mobile device.That's just one particular way of encoding an object's state. If that's not available, you can see if another one is, such as java.beans.XMLEncoder/Decoder, or see if [url http://xstream.codehaus.org/]XStream will work with J2ME.
Failing that, if the basic reflection facilities are available, you can create your own object <--> byte encoding/decoding.
If not, then you're SOL for the general case, and will have to write explicit methods for each class you wish to deal with, using whatever methods they provide to expose their internal state.

Similar Messages

  • How can I store a File object into a Vector and get it back

    hi there
    I need to store a number of File object into a Vector first, and later on I need to get each File object out and work with it.
    Vector mylist;
    File[] myfile;
    ....get a list of files from using File Chooser
    mylist = new Vetor();
    for (i=0;i<myfile.length;i++){
    mylist.add(myfile);
    ..how do I get them back? i try to do this way
    for (i=0;i<mylist.size(); i++)
    File tempfile = mylist.get(i);
    ..work with tempfile. but I got java.lang.object error: imcompatible types. what can I do?

    Vector mylist;
    File[] myfile;
    ....get a list of files from using File Chooser
    mylist = new Vetor();
    for (i=0;i<myfile.length;i++){
    mylist.add(myfile);
    ok try this: i don't reall understand what your trying to do though...
    File[] files;
    // get files
    Vector fileList = new Vector();
    for (int i = 0; i < files.length; i++)
      fileList.add(files);
    // to get them out.
    for (int i = 0; i < fileList.size(); i++)
    ((File)fileList.elementAt(i)).toString();
    // or
    // to get them out.
    for (int i = 0; i < fileList.size(); i++)
    File temp = (File)fileList.elementAt(i);
    System.out.println(temp.toString);

  • My new purchases will not sync into my playlist and get and will not show up on my iphone playlist of the same name, and I just tried to sync a new cd into my library and it is not showing up on my iphone.

    My new purchases will not sync into my playlist and get and will not show up on my iphone playlist of the same name, and I just tried to sync a new cd into my library and it is not showing up on my iphone.

    Hello there, Capricious13.
    There are great pointers in the following Knowledge Base article. Depending on where you see the content and where you want to get it to, this should guide you to putting it in the right place:
    Downloading past purchases from the App Store, iBookstore, and iTunes Store
    http://support.apple.com/kb/ht2519
    Thanks for reaching out to Apple Support Communities.
    Cheers,
    Pedro D.

  • Adding objects into query Panel and no display report

    Hi Folks,
    I had an issue with WEBI .
    Iam running the report with few objects at first time , all objects are displayed in the  table format of report.
    I saved and closed the report .
    Later  i opened the report and edited the report by adding new objects into query panel and runing it.
    but this time  i did not find the new objects in display table in report as like DeskI.
    If we find the solution for this , it will be great help to me.
    Thanks
    Mahesh

    The objects will be in the data tab. Objects are not automatically added to your report in Webi, they are made available in the data panel, and you can choose which objects to add.

  • I am trying to upload new version iTunes into Windows 7 and getting error message that runtime is loading incorrectly. Cannot connect to online support. Any ideas please?

    I am trying to upload new version iTunes into Windows 7 and getting error message that runtime is loading incorrectly. Cannot connect to online support. Any ideas please?

    See Troubleshooting issues with iTunes for Windows updates.
    tt2

  • A music album is listed multiple times in my library but each listing only has a few songs in it-not the full listing.  How can I combine them into one album and get rid of other duplicate listings?

    Several music albums listed in my IPhone 5 music library are listed multiple times, but each one only has a portion of the songs listed.  How can I combine them to make one album?

    First....Thank you so much for your prompt reply.  I am sorry for not getting back to you regarding your suggestion-I had computer issues that just got resolved.  Also, this is my first foray into online chat rooms so I have a lot to learn to precisely state my issue!  I did as you suggested and all the songs list the same album when I go into each song's "get info".  However, I am not sure how to edit as you suggested. When I downloaded this album originally, for some reason it broke up into several albums each with different songs from the original album.  I am trying to consolidate them back into one album in my library.  I would greatly appreciate further assistance if you can.  Also, I do not use "the cloud" to store any data and would like a good source of info on how to do this.  Thanks so much for your patience!
    SueZoo

  • How do i set an appointment into my iphone and get a warning sign for the appointment to date into my agenda ?

    Since IOS5.1 , I been having a hard time getting my agenda to show my appointments and give me a warning sign like alarm or a reminder alarm for them .
    Now since the new update we have had one app split into two and gotten reminder and agenda .
    Now i have been using o r better said been trying to use the reminder , to get my appointments set right .
    But it seems to be that i do not get a warning of any type from my phone about the coming date , i set up the reminder for in the first place .
    Before ios5.1 the reminder was intergrated into the agenda and for more easy to use since the new .
    Now the agenda has no more option to also add birthdays and other handy reminders which are on a yearly bases .
    I have been trying to find out if i missed something or other , and come to the conclusion that i see no options aviable to either enable or disable anything of the sort to change this .
    Also i have been reading the manual and i notest that in there is no reminder of how this new stationary app from apple itself works and explained .
    Anyone can enlighten me about this please , thank before hand and greetings from verbodentoegang

    So I have bought a couple of apps on my iphone and would like to transfer them to my itunes library, but not sure how.
    iTunes > File > Transfer purchases
    When I plug in my iphone and try and sync the two, I get a warning from itunes that everything on my iphone will be wiped and everything from my itunes library will be moved to it.
    Have you changed the computer you are syncing with?

  • I'M TRYING TO GET INTO YAHOO GROUPS AND GET A "CONNECTION HAS BEEN RESET..." TYPE MESSAGE??

    I'M SORRY FOR THE CAPS BUT I HAVE OLE EYES, ARTHRITIS AND CARPEL TUNNEL!!!!
    I STARTED HAVING THIS PROBLEM A FEW WEEKS AGO AND IT HAS PROGRESSED TO TOTALLY BLOCKING ME FROM GETTING INTO MY YAHOO GROUPS AT ALL!!! EVERY TIME I TRY IT GIVES ME THIS SAME MESSAGE AFTER IT TELLS ME AT THE BOTTOM THAT IT IS CONNECTED TO THE GROUP -
    The connection was interrupted
    The connection to groups.yahoo.com was interrupted while the page was loading.
    The site could be temporarily unavailable or too busy. Try again in a few moments.
    If you are unable to load any pages, check your computer's network connection.
    If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.
    THE CONNECTION IS OK - BUT I DON'T KNOW ABOUT FIREWALLS AND PROXY THINGS BUT I GET ALL THE OTHER SITES I LOG TO!
    THIS ALSO KEEPS HAPPENING WHEN I TRY TO ACCESS FACEBOOK BUT IT DOES LET ME IN SOMETIMES?!?!
    I HAVE NO IDEA WHAT TO DO OR WHERE TO LOOK ON MY SYSTEM TO FIX THIS (NEED COMPUTERS FOR DUMMIES 100!!!! 101 IS TOO ADVANCED!!!!) I'M ON AN HP 2000 NOTEBOOK PC WITH WINDOWS 8.
    THANKS FOR ANY HELP!!!!
    DEE MAYER

    You can use the NoSquint extension to set font size (text/page zoom) and text color on web pages.
    *NoSquint: https://addons.mozilla.org/firefox/addon/nosquint/
    It is possible that your security software (firewall, anti-virus) blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.
    Remove all rules for Firefox and the plugin-container from the permissions list in the firewall and let your firewall ask again for permission to get full, unrestricted, access to internet for Firefox and the plugin-container process and the updater process.
    See:
    *https://support.mozilla.org/kb/Server+not+found
    *https://support.mozilla.org/kb/Firewalls
    *https://support.mozilla.org/kb/fix-problems-connecting-websites-after-updating
    You can try these steps in case of issues with web pages:
    Reload web page(s) and bypass the cache to refresh possibly outdated or corrupted files.
    *Hold down the Shift key and left-click the Reload button
    *Press "Ctrl + F5" or press "Ctrl + Shift + R" (Windows,Linux)
    *Press "Command + Shift + R" (Mac)
    Clear the cache and cookies only from websites that cause problems.
    "Clear the Cache":
    *Firefox/Tools > Options > Advanced > Network > Cached Web Content: "Clear Now"
    "Remove Cookies" from sites causing problems:
    *Firefox/Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    If it works in Safe Mode and in normal mode with all extensions (Firefox/Tools > Add-ons > Extensions) disabled then try to find which extension is causing it by enabling one extension at a time until the problem reappears.
    Close and restart Firefox after each change via "Firefox > Exit" (Windows: Firefox/File > Exit; Mac: Firefox > Quit Firefox; Linux: Firefox/File > Quit)
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • If Apple EarPods just randomly decided to break into 2 pieces and get stuck in the headphone jack, will Apple replace or repair the iPad for free?

    After I was done listening to some music, I of course puller out the EarPods from the headphone jack. But then I noticed how the tip broke into 2, so half of the tip is stuck in the headphone jack. Since they were Apple EarPods, and I didn't inflict any damage to them, would I receive a free repair or replacement on my iPad?

    Are you still under warranty? You're going to have a tough time convincing them it wasn't your fault they broke, I predict. In any case, someone else had a good idea on one of these types of threads: take it to an electronics shop as they probably deal with this situation quite frequently.

  • Nokia C5 new FW 61.005 and get bugs again -.-!

    I've updated my phone to 61.005 ang got some bugs, i cant use my timezone (im from Vietnam), then i must changed to Thailand and phone speakers now have to much noises, its worse than 32.010 version

    (1) Updated through OVI suite. Around 125mb dowload. But through phone, just 5 or 6 mb. dont know why the difference.
    (2) Smileys possible in message. But can't choose from an 'insert' menu. Have to type :-) or :-( or etc to get those. (have not checked in 032.010)
    (3) 'Insert symbol' option no more available. 
    (4) My calendar still doesn't show week numbers.  
    (5) Seems Fast
    (6) Ringtone volume seems louder. though shrilling...very useful in noisy environments!!!!
    (7) Satellite signal status missing in maps.

  • Can i restore macbook air and get ilife again?

    I bought a used macbook air mid 2011 model and it does not have the pre installed iLife apps. Is there a way where I can restore the macbook to factory settings and have those apps be available again so i dont have to buy each one individually?

    No - they belong to the original purchaser - you will have to purchase your own copies
    LN

  • Getting data from view object into backing bean

    Hi,
    My requirement is explained below -
         I have a ADF editable table in a jsf page which is connected to backend database table. In the table there are 6 columns and only 2 are editable. So when user inputs a value in first input column an event is triggered such that the data for all the remaining columns should be fetched from another database table.
    Typically if we are not using ADF development environment. We would have had a simple business method which creates the sql query by taking the input from textbox with simple where clause and I would have got the data. I am not getting any idea how to do this in ADF. I have the second table as view object but how to access the view object from backing bean and get data based on the input given.

    Hi,
    step 1) Expose a method on the ViewObject Impl class
    step 2) define arguments for the method as needed to identify the row to read data from
    step 3) retrieve the row from the VO that holds the data you want to add and return a HashMap with this information
    step 4) expose the method on the client interface (Java menu selection on the View Object)
    step 5) In the PageDef file, create a method binding to the method you exposed on the ViewObjectImpl
    step 6) Call the method binding from the managed bean like
    OperationBinding getDataFromVO = (OperationBinding) BindingContext.getCurrent().getCurrentBindingsEntry().get("Name of method binding);
    getDataFromVO.getParamsMap().put("name of arguments1", value1);
    getDataFromVO.getParamsMap().put("name of arguments2", value2);
    Object retData = getDataFromVO.execute();
    if(retData != null && getDataFromVO.getErrors().size()==0){
      HashMap retDataMap = (HashMap) retData;
    ... follow the rest of your logic ....
    Frank

  • How do I load an .atf file into a ByteArray for upload to the GPU?

    I'm trying to optimise the amount of GPU memory my textures use for a Stage3D project so I thought I'd finally switch to ATF textures. I've converted them from png to atf using the png2atf tool and I'm loading them with a URLLoader but I'm having trouble passing the textures into ByteArrays. I've tried various things and I'm running out of ideas; Does anyone know the AS to pass a loaded atf into a ByteArray? I need it to be a ByteArray for upload to the GPU with the
    uploadCompressedTextureFromByteArray method on the Texture class - unless someone knows better...

    Hello there. Thanks for the reply, but I had already seen that page (I've been searching online a lot for a solution to this). That page only details using the Embed tag to add the .atfs. I want to load them in at run time with a URLLoader. THAT's working fine; It's then passing the loaded object into a ByteArray that I'd like help with. Cheers.

  • Merging Two Graphics2D objects into one

    Is it possible to accomplish this:
    1) have a method in class A that returns a Graphics2D object
    2) have a method in class B that returns a Graphics2D object
    3) have class C call both class A's and class B's methods that return Graphics2D objects
    4) lay those two Graphics2D objects into a new Graphics2D object within a component's paint(Graphic g) method
    What I am trying to do is a lot like a Viso diagram, that is drag a graphic onto another graphic x numberof times and perform some kind of layering technique.
    Thanks

    Why don't you pass a graphics 2D into each method, and get method to draw onto that. Then it becomes very simple to combine each.
    MArk

  • How do u pass an object into a method

    I want to create a method getData that takes an object of type Helper and returns an object of the same type.
    how do u pass objects into a method and how do u get objects as returns im a bit confused

    That will just allow you to pass a parameter. If you want to return a helper object
    Helper paramHelper = new Helper();
    Helper someHelper = callMethod(paramHelper);
    public Helper callMethod(Helper hobj) {
        //<some code>
        Helper retHelper = new Helper();
        //<blah, blah>
        return retHelper;

Maybe you are looking for

  • How to establish connection between two different IP Range

    Hi All, Currently in my office  there are two different ip range that we are using one for the Wi-FI(192.168.1.X) & 2nd  for local machine & servers 192.168.2.x series ip. In current situation if any Wi-Fi user(Laptop User) wants to communicate with

  • How can I reset an older desktop Mac to original settings?

    Hello everybody!  I'm hoping I can get some help with this question.  Bear with me as I have no idea what I'm doing with computers... My boyfriend has an older Mac desktop computer.  As far as I understand, he purchased it used from someone else. It

  • Why no HD TV content?

    I have just sampled the TNA HD wrestling on BT Vision.  Not my cup of tea but the picture quality is excellent and i was able to start watching within about a minute. So, my question is, why isn't any of the TV content HD?  I can see no reason if BT

  • Is it possible to deploy Web Services to Tomcat?

    Good day, Can anybody tell me or it is possible to deploy Web Services to Tomcat 5.5.x ? It is possble for ADF, so I was wondering or it is possble for Web Services. I tried to deploy it with the following libraries: J2EE (excluding the servlet.jar u

  • Safari 5 Crashes When Opening A New Tab

    I upgraded to Safari 5 and whenever I open a new tab... whether its with Command-T or double/right clicking the tab bar, It crashes every time! I am on 10.6.3. Safari 4 worked fine. I already tried moving all my plugins to the desktop along with the