// read first time
ObjectReader or = new ObjectReaderImpl(new FileInputStream(serf));
FilePersistedValueData vd1 = null;
PersistedValueDataReader vdr = new PersistedValueDataReader(holder, SpoolConfig.getDefaultSpoolConfig());
try
{
vd1 = (FilePersistedValueData)vdr.read(or, PropertyType.BINARY);
}
catch (UnknownClassIdException e)
{
fail(e.getMessage());
}
or.close();
// Imitation save
((StreamPersistedValueData) vd1).setPersistedFile(((StreamPersistedValueData) vd1).getTempFile());
// read second time
or = new ObjectReaderImpl(new FileInputStream(serf));
FilePersistedValueData vd2 = null;
try
{
vd2 = (FilePersistedValueData)vdr.read(or, PropertyType.BINARY);
}
catch (UnknownClassIdException e)
{
fail(e.getMessage());
}