This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
and thank you, Cat, for changing your display name.
Welcome to the ranch!
To your question: You have to write the two ints seperately. And read it seperately. When you make the private void writeObject(ObjectOutputStream os) - method and the complementary readObject method, you have to be sure to do this in the right sequence.
Here is an example where I mixed it up (bold):
output: [Bird with 2 legs and 2 wings, Fly with 6 legs and 2 wings] null [Bird with 2 legs and 2 wings, Fly with 2 legs and 6 wings]