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.
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.
You might keep your resources stored in the class as byte[] arrays. Using ByteArrayInputStream and ByteArrayOutputStream you are able to wrap the arrays as streams and use them to store and retrieve resources.