Results 1 to 2 of 2
  1. #1
    Hasan is offline Member
    Join Date
    May 2007
    Posts
    11
    Rep Power
    0

    Default How do I omit an object when serializing?

    I want to serialize a class that has an object of a class that has an AudioClip object in it and Java is not letting me serialize it. I think there is a way to tell the output stream to skip an object in a class but I can't remember how and I can't find much help online. Can someone help me?

  2. #2
    Valeriano is offline Member
    Join Date
    May 2007
    Posts
    10
    Rep Power
    0

    Default

    For anything you want to have serialized declare its class implements Serializable.

    For anything field you want to skip on serialization declare the field transient.

    Here is the tutorial:

    Discover the secrets of the Java Serialization API

Similar Threads

  1. Replies: 2
    Last Post: 11-26-2010, 02:12 AM
  2. Object
    By sireesha in forum New To Java
    Replies: 1
    Last Post: 01-10-2008, 01:31 AM
  3. Serializing Arrays
    By javaplus in forum New To Java
    Replies: 3
    Last Post: 11-08-2007, 09:09 AM
  4. Creating object of Type Object class
    By venkatv in forum New To Java
    Replies: 3
    Last Post: 07-17-2007, 03:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •