*/
private void readObject(ObjectInputStream in)
throws IOException, ClassNotFoundException {
int width;
int height;
SerializableState sampleModelState = null;
SerializableState dataBufferState = null;
Point location = null;
width = in.readInt();
height = in.readInt();
sampleModelState = (SerializableState)in.readObject();
dataBufferState = (SerializableState)in.readObject();
location = (Point)in.readObject();
// Restore the SampleModel from its serialized form.
SampleModel sampleModel = (SampleModel)sampleModelState.getObject();
if (sampleModel == null) {
theObject = null;
return;
}
// Restore the DataBuffer from its serialized form.
DataBuffer dataBuffer = (DataBuffer)dataBufferState.getObject();
// Reconstruct the Raster.
theObject = Raster.createRaster(sampleModel, dataBuffer, location);
}