<p>I'm developing a kind of an exchange format between instances of an application so that user could save information to file and restore it later. The whole 'exchange format' is a single class that gets serialized and written to disk.</p>

<p>How would you suggest to store graphical/sound information inside that class? I'd like to avoid just putting the files into it a .jar.</p>

** me **
how about more details on your case? the "best" method usually depends on the particular application/use.  does the image/sound come from files? from a stream?  Is each instance of the class expected to store separate images? Or can an image be shared between different instances?
gsmd
images come from files, sounds come
  from a stream; there's actually a Set
  of items some of which may have an
  image attached; an image can't be
  shared
What methods have you tried?
I guess using the Serializable interface is the way to go. Here's
two
articles
on the topic.
Basically,
implement the Serializable interface in your class
mark members which shouldn't be saved in the file as transient (members which contain contextual data like file handles, socket connections ,etc).
you have to customize how your image and sound classes write data using, but implementing:
private void writeObject(ObjectOutputStream out) throws IOException;
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException;