These days, we've happened to fullfill a task that convert complex entity objects to byte arrays. Naturally, the interface serializable has come into my brain at once.
However, the performance became a main issue - it's too slow. An [url=http://www.javalobby.org/forums/thread.jspa?messageID=92059245]article[/url] came to an help, which suggests a substitution, Externalizable, for Serializable. By which the performance was twice as efficient as the original design.
But this still not meet the requirement. The final way is to utilize an anti-object-oriented programming pattern - just use byte array to store data.
However, the performance became a main issue - it's too slow. An [url=http://www.javalobby.org/forums/thread.jspa?messageID=92059245]article[/url] came to an help, which suggests a substitution, Externalizable, for Serializable. By which the performance was twice as efficient as the original design.
But this still not meet the requirement. The final way is to utilize an anti-object-oriented programming pattern - just use byte array to store data.