How do you take total control over serialization???

Please read this whole post before answering because Ive asked this question twice and people keep telling me things I already know.
ok I posted this b4 and people dont seem to get it so Ill explain everything i know about serialization. To serialize an object you call the writeObject(Object o) from the ObjectOutputStream class. The Object must inherit Serializable (an empty interface). I read in a java book I have that if you put a method with the signature: "private void writeObject(ObjectOutputStream out) throws IOException" into your Serializable class, ObjectOutputStream will call this instead of using its default serialization method. However, when I did this, I started by making my writeObject method empty. Even with it empty I got errors about fields in my class not being Serializable. According to the book however, it should be trying to Serialize them right? So Im guessing that its doing both the default Serialization process and my method (or maybe not even my method). Can someone please tell me how to do this correctly??

idk I didnt implements externalizable because I dont wanna complicate this nemore I just wanna find out why it wont work. I cant post my code because its huge. But basically, I have a JTabbedPane subclass with a Vector of SetPanes in it. SetPane has a field parent which is of type Experiment (the tabbedpane). When I try to Serialize the Experiment, I first got errors because I had JMenu's in my SetPane. to fix this I tried a custom serialization. didnt work. So then I did wat you said, called the function directly. that worked as far as I know (except I had to lose the parent field cause it was recursive). It worked until I had to deserialize it. There is no way to "call the function directly" when your deserializing so I got totally lost. Thats why Im trying to figure out how to use custom serialization the way my book tells me but it wont work!!!

Similar Messages

  • Step by step Create a Desktop Administrator to have full and total control over desktops only

    I have been trying to setup a Desktop Admin so that the group has full and total control over all desktops. I am using SCCM 2012 SP1. I have found very little documentation that explains in detail on how to set this up. I have read about role based access,
    but found nothing that explains in detail how to setup an administrator that can do everything but only with desktop machines, not servers.

    Hi John and Matthew,
    Great link John, thank you for that.  I did follow the instructions to a "T", but the Desktop Admin is still having problems.  He is trying to image a new machine (so it is not in the collection yet). When he tries to import it by using the "Import
    Computer Information Wizard", he gets to the "Choose Target Collection" tab, selects the "Browse" button, but cannot see any collections.  I have verified (using the instructions that Matthew provided - thank you) that he is a "Full Administrator" for
    the Desktop collections and folders where they are located.
    Could you please tell me what I am missing?
    Ken

  • When using i-Cloud PAGES with another shared person, how to you shift ownership control of the file to the other who started as a collaborator?

    When using i-Cloud PAGES with another shared person who is a collaborator, how to you shift ownership control of the file to the shared person who started as a collaborator and needs to take over file ownership responsibilities?

    Thanks, but I have searched here but have not found or heard a direct answer to my question as stated above...

  • How do you take pictures from one library and put in another library??

    How do you take pictures from one library and put in another library??

    Options:
    1. Export from iPhoto A to the Finder, then import to iPhoto B
    This gets the photo over, but no versions, no edit history and not all the metadata
    2. Use iPhoto Library Manager
    This gets everything: versions, edit history and all the metadata.
    Regards
    TD

  • How do you take off text field

    How do you take off text field

    Hi again, sounds like you accidently hey CMD+F5 & turned on Voice Over, try CMD+F5 again, or see this...
    I think the issue is caused by the Apple Voiceover Utility. Part of its function for the visually impaired is to highlight the button or text item that it is going to speak. i suggest you turn off Voice over either going to System Preferences -> Universal Access and Making sure that voiceover is turned off. Alternatively press Apple(Command) F5 to turn it on & off. The black rectangles should go away. If you want voiceover but not the black rectangles. You can open the voice over utility and change the settings to the text is still spoken but without the highlighting.
    https://discussions.apple.com/message/5786829#5786829

  • Want total control over the size of a button

    What do I do if I want to control the size of a button completely and not let something else do it for me automatically? What layoutmanagers allow me to completely control the size and which do not?

    For total control over the button size, call container.setLayoutManager(null). This, however, disables all automatic layout; not only will you have control over the size of your button, you'll have control over its position and the size and position of all other components in that container. You'll also have the responsibility to set them.
    While this is desirable in some circumstances, you normally want to use a LayoutManager. These managers allow your code to be modified with greater ease and handle a lot of the work for you.
    You can always call jbutton.setPreferredSize(new Dimension(x,y));[b] to attempt to communicate to the LayoutManager the size that you would like the button to be. [b]jbutton.setMinimumSize and jbutton.setMaximumSize are also useful. (These calls assume the existence of a field jbutton which contains an instance of the class JButton.)
    These, however, only work if the LayoutManager honors your requests; it is quite possible for a LayoutManager to ignore your sizing requests on the objects it is laying out. Most of the managers that Sun provides respect the requests their users make, but many third-party LayoutManagers aren't capable of doing so for one reason or another.
    Yet another solution is to write your own LayoutManager. The interface is relatively simple. I personally have been working on a project in which a workspace allows users to move components around. Because of this, the component has to stay where the user put it, although its size should be adjusted according to its needs. I had to write my own LayoutManager for this because none of those that Sun provided properly suited my needs.
    Which way would you like to tackle this?

  • S2110 - Screenshot, How Do You Take One?

    How do you take a screenshot with this tablet? I couldn't get a power+home to work. Do these forums let us upload pictures or is all link based? I'm not sure how to read the battery meter well. I ran it to 1% left and it said it was on for 11 hours 26 minutes. And remember when I said I had 19% left? I was an hour into immortals and the tablet finished the stream over netflix with 1% to spare.
    Anyways, I think its time to start a new topic and let this one rest as we know now they are shipping!
    Moderator Note; post moved here to start new thread, subject edited
    Solved!
    Go to Solution.

    Ok I just took a snapshot from my tablet, and idnt even know how I did it. I went to turn down the volume And i hit the power button and it took one.. i tried again. Nothing happened. Idk uow to do it again.

  • How do you take a screenshot on a Macbook pro?

    How do you take a screenshot on a Macbook Pro?

    Take a picture of the whole screen
    Command (⌘)-Shift-3
    Take a picture of part of the screen
    Command (⌘)-Shift-4, and then drag the crosshair pointer to select the area. Continue to press the mouse button, release the keys, and then press Shift, Option, or the Space bar while you drag to resize the selection area. When you are ready to take a picture, release the mouse button.
    To cancel, press Escape before you release the mouse button.
    Take a picture of a window or the menu bar
    Command (⌘)-Shift-4, press the Space bar, move the camera pointer over the area to highlight it, and then click.
    To cancel, press Escape before you click.
    Take a picture of a menu, including the title
    Click the menu to display the menu commands, press Command (⌘)-Shift-4, and drag the crosshair pointer over the area.
    To cancel, press Escape before you click.
    Take a picture of the menu without its title
    Click the menu to display the menu commands, press Command (⌘)-Shift-4, press the Space Bar, move the camera pointer over the menu to highlight it, and then click.
    To cancel, press Escape before you click.

  • HT3597 How do you exit voice control on iPhone 4, with iOS7.1.1?

    How do you exit voice control on iPhone 4, with iOS7.1.1?

    capsjenwalker wrote:
    How do I disable Voice Control all together on a 4?
    Sorry, you can't. There is no setting to completely disable such.

  • How do you take off reseiving messages on multiple devices using the same apple account

    How do you take off reseiving messages on multiple devices using the same apple account?

    Go to Settings>Messages>Send and Receive on all but one device and add a unique email address on each device and delete the commone Apple ID email device
    If there is also an iPhone with iOS 6 associated with the Apple ID, uncheck the phone number on all but the phone.

  • Since the iPod Lightning connection is not supported, how can you take videos from your iPod 5th Gen to your tv?

    Since the iPod Lightning connection is not supported, how can you take videos from your iPod 5th Gen to your tv?

    Lightning TV out
    - Via Airplay to an Apple TV.
    or one of these cables.
    - http://store.apple.com/us/product/MD826ZM/A/lightning-digital-av-adapter?fnode=3 a
    - http://store.apple.com/us/product/MD825ZM/A/lightning-to-vga-adapter?fnode=3a

  • How do you import copyright controlled cds into Itunes?

    Hi
    how do you import copyright controlled cds into Itunes?
    When i put the cd into my computer, Itunes does not read it like a regular cd. It does not show up in my source list.
    I just want to put the songs on the cd onto my ipod.
    The cd will play in windows media player and i was able to save the cd as wma files onto my computer, and then i tried to import those files, but Itunes says the file is copyright controlled, and the only way for itunes to import it is with the orignal cd? The original cd was in my D drive the whole time, but it still will not let me import.
    I also tried physically looking into the CD for the music files, but those aren't there. The cd is like an enhanced cd where if you look into the drive for files there are no files except for 2 icons. The actual icon the open the player to play the cd and a uninstall icon.
    does anyone know how to do this? PLEASE HELP!

    I have downloaded the latest version of Itunes. I don't think that is the problem. Music companies have started issuing "copyright controlled" cds now especially on import versions of cds. I have the original cd, but Itunes cannot import it due to the copyright because it is protected. I read the "help" file on the cd, and what it does is you can play it as much as you like, you can make a copy of the cd only 3 times. The copy of the CD is also copyright protected. I have tried Itunes, WMA, Sonicstage, Sonic and etc programs, but nothing has worked.
    Hopefully, someone from APPLE will now what I mean about the copyright controlled CDs. I only want to be able to listen to the music on my IPOD. Nothing has worked

  • How do you display total time for playlist in Itunes 11

    how do you display total time for playlist in Itunes 11

    "I can see the total time in my playlist on the computer but not on my device??"
    I have just posted a question asking the same!
    Did you have any joy?

  • How can you take a video including music from IPhoto and put it onto a disk?

    How can you take a video including music from IPhoto and put it onto a disk?

    You need burn software which will author/encode the movie so it can be viewed using any DVD player - there is iDVD (still available as part of the retail 09 or 11 iLife disks at online resellers including ebay and Amazon) or Roxio Toast ($$) or Burn (free, but very basic).

  • How can you take off the volume limit?, How can you take off the volume limit?

    How can you take off the volume  limit on iPod touch ?

    Which "volume limit" do you mean?
    All iPods have a volume limit feature that you can set yourself and on your iPod, go into Settings/Music/Volume Limit. There, you can set the volume limit to maximum, which is the same as turning it off.
    However, if you mean the EU (European Union) volume restriction, on all iPods sold inside the EU, you cannot turn that off.

Maybe you are looking for

  • Hp officejet pro 8500a - get "error - printing" on all documents

    Quick history: Both my laptop and my printer HP Officejet Pro 8500 A910 have been working happily for months, with wireless connection via Belkin wireless hub. > Had printer jam errors - so just replaced printer under warranty - completed set-up - pr

  • Implements php function in dreamweaver cs4 / cs5

    Hi, I made a framwork for my company that develops using php. It would be nice to not always having to explain the use of functions, implement dreamweaver, possibly through an extension, the intellisense for these functions. for example when using th

  • Descriptive flexfield setup

    Hi, need help and advise. I have created a descriptive flexfield for attribute17 column of hz_cust_site_uses_all table with value set 'Yes/No' (LOV type) for validation. My problem is how to make the descriptive flexfield to reflect the existing valu

  • I want to uninstall my latest version of Firefox NOT my new printer which has now been disabled by Firefox.

    My new printer is HP Photosmart Series 110. AFTER I downloaded Firefox, Firefox says my printer is incompatible with my newly downloaded Firefox. I want to return to my previous Firefox level and uninstall the new download. Thanks!

  • Doc ID :431652.1

    Hi I want to drop the current undo tablespace and create another one instead. I am following the Doc ID 431652.1 word by word and still getting the error: ORA-01092: ORACLE instance terminated. Disconnection forced I am sure the fault is not on my pa