java.lang.OutOfMemoryError
Hi
I am writing an application which takes a stream and converts it into an image with some manipuation on it.
( zooming out the image.)
I have set the zooming to 90% initially.But it throws the following error
java.lang.OutOfMemoryError
I want to catch this Exception,reduce the zoom size and do the manipulation again.
Example:
public double zoom=0.9;
public void f1(){
try{
//
//
//zoom the document to (zoom*100)%
//
//
}
catch(java.lang.OutOfMemoryError){
//reduce the zoom
//call function f1 to do all manipulations again
//
}
}
Explanation:Consider f1 be the function throwing the exception.I have caught the exception.But the issue remains is that memory is not getting free and the exception is thrown again and again.
How should I free the memory and avoid this error.
Thank you,
Ketan.

