java.lang
Class OutOfMemoryError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Error
-
- java.lang.VirtualMachineError
-
- java.lang.OutOfMemoryError
-
public class OutOfMemoryError extends VirtualMachineError
Thrown when a request for memory is made that can not be satisfied using the available platform resources. Such a request may be made by both the running application or by an internal function of the virtual machine.
When the applet runs out of memory, OutOfMemoryError should be thrown, to allow the applet to recover properly (i.e., to release unused memory). Note that there are cases when OutOfMemoryError should be thrown but there is not enough memory to allocate the error. If this happens, the session with the applet is terminated and the host application receives an APPLET_FATAL error.
-
-
Constructor Summary
Constructors Constructor and Description OutOfMemoryError()
Constructs a newOutOfMemoryError
that includes the current stack trace.OutOfMemoryError(String detailMessage)
Constructs a newOutOfMemoryError
with the current stack trace and the specified detail message.
-
Method Summary
-
Methods inherited from class java.lang.Throwable
fillInStackTrace, getMessage, getStackTrace, printStackTrace, printStackTrace, toString
-
-
-
-
Constructor Detail
-
OutOfMemoryError
public OutOfMemoryError()
Constructs a newOutOfMemoryError
that includes the current stack trace.
-
OutOfMemoryError
public OutOfMemoryError(String detailMessage)
Constructs a newOutOfMemoryError
with the current stack trace and the specified detail message.- Parameters:
detailMessage
- the detail message for this error.
-
-