java - Storing Serializable object to file with some data excluded -
i have object allows me store bufferedimage object file. in same object have bufferedimage variable use cache image after it's loaded first time raw data array. works fine when i'm creating object , storing file, since bufferedimage null. problem comes when i'm updating loaded object , variable being initialized , want save object after it's updated.
is there possibility store serializable object file, excluding of variables? or maybe can reset somehow bufferedimage variable when storing file?
thanks in advance, serhiy.
you should mark attribute don't want serialize transient :
private transient bufferedimage image;
Comments
Post a Comment