I am setting up a hash function that takes the MD5 of an object and tacks on the first four bytes of the object to prevent collisions. These objects can be quite large so I'd prefer to avoid serializing the entire object. What is the most space/time efficient way I can do this?
I've been looking at ObjectOutputStream and while it appears that there is a partial write function, it seems to require that I've already converted the object into a byte array.
transientfields? You can mark any field in your class as transient if you don't want to persist it.