IllegalStateException
public
class
IllegalStateException
extends RuntimeException
Known Direct Subclasses
AlreadyBoundException,
AlreadyConnectedException,
CancellationException,
CancelledKeyException,
ClosedSelectorException,
ConnectionPendingException,
FormatterClosedException,
IllegalBlockingModeException,
InvalidMarkException,
MediaCodec.CodecException,
MediaDrm.MediaDrmStateException,
MediaDrmResetException,
NoConnectionPendingException,
NonReadableChannelException,
NonWritableChannelException,
NotYetBoundException,
NotYetConnectedException,
OverlappingFileLockException
AlreadyBoundException |
Unchecked exception thrown when an attempt is made to bind the socket a
network oriented channel that is already bound.
|
AlreadyConnectedException |
Unchecked exception thrown when an attempt is made to connect a SocketChannel that is already connected.
|
CancellationException |
Exception indicating that the result of a value-producing task,
such as a FutureTask , cannot be retrieved because the task
was cancelled.
|
CancelledKeyException |
Unchecked exception thrown when an attempt is made to use
a selection key that is no longer valid.
|
ClosedSelectorException |
Unchecked exception thrown when an attempt is made to invoke an I/O
operation upon a closed selector.
|
ConnectionPendingException |
Unchecked exception thrown when an attempt is made to connect a SocketChannel for which a non-blocking connection operation is already in
progress.
|
FormatterClosedException |
Unchecked exception thrown when the formatter has been closed.
|
IllegalBlockingModeException |
Unchecked exception thrown when a blocking-mode-specific operation
is invoked upon a channel in the incorrect blocking mode.
|
InvalidMarkException |
Unchecked exception thrown when an attempt is made to reset a buffer
when its mark is not defined.
|
MediaCodec.CodecException |
Thrown when an internal codec error occurs.
|
MediaDrm.MediaDrmStateException |
Thrown when an unrecoverable failure occurs during a MediaDrm operation.
|
MediaDrmResetException |
This exception is thrown when the MediaDrm instance has become unusable
due to a restart of the mediaserver process.
|
NoConnectionPendingException |
Unchecked exception thrown when the finishConnect method of a SocketChannel is invoked without first
successfully invoking its connect method.
|
NonReadableChannelException |
Unchecked exception thrown when an attempt is made to read
from a channel that was not originally opened for reading.
|
NonWritableChannelException |
Unchecked exception thrown when an attempt is made to write
to a channel that was not originally opened for writing.
|
NotYetBoundException |
Unchecked exception thrown when an attempt is made to invoke an I/O
operation upon a server socket channel that is not yet bound.
|
NotYetConnectedException |
Unchecked exception thrown when an attempt is made to invoke an I/O
operation upon a socket channel that is not yet connected.
|
OverlappingFileLockException |
Unchecked exception thrown when an attempt is made to acquire a lock on a
region of a file that overlaps a region already locked by the same Java
virtual machine, or when another thread is already waiting to lock an
overlapping region of the same file.
|
|
Signals that a method has been invoked at an illegal or
inappropriate time. In other words, the Java environment or
Java application is not in an appropriate state for the requested
operation.
Summary
Inherited methods |
From
class
java.lang.Throwable
|
From
class
java.lang.Object
Object
|
clone()
Creates and returns a copy of this object.
|
boolean
|
equals(Object obj)
Indicates whether some other object is "equal to" this one.
|
void
|
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
final
Class<?>
|
getClass()
Returns the runtime class of this Object .
|
int
|
hashCode()
Returns a hash code value for the object.
|
final
void
|
notify()
Wakes up a single thread that is waiting on this object's
monitor.
|
final
void
|
notifyAll()
Wakes up all threads that are waiting on this object's monitor.
|
String
|
toString()
Returns a string representation of the object.
|
final
void
|
wait(long millis, int nanos)
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object, or
some other thread interrupts the current thread, or a certain
amount of real time has elapsed.
|
final
void
|
wait(long millis)
Causes the current thread to wait until either another thread invokes the
notify() method or the
notifyAll() method for this object, or a
specified amount of time has elapsed.
|
final
void
|
wait()
Causes the current thread to wait until another thread invokes the
notify() method or the
notifyAll() method for this object.
|
|
Public constructors
IllegalStateException
IllegalStateException ()
Constructs an IllegalStateException with no detail message.
A detail message is a String that describes this particular exception.
IllegalStateException
IllegalStateException (String s)
Constructs an IllegalStateException with the specified detail
message. A detail message is a String that describes this particular
exception.
Parameters |
s |
String :
the String that contains a detailed message
|
IllegalStateException
IllegalStateException (String message,
Throwable cause)
Constructs a new exception with the specified detail message and
cause.
Note that the detail message associated with cause
is
not automatically incorporated in this exception's detail
message.
Parameters |
message |
String :
the detail message (which is saved for later retrieval
by the getMessage() method). |
cause |
Throwable :
the cause (which is saved for later retrieval by the
getCause() method). (A null value
is permitted, and indicates that the cause is nonexistent or
unknown.) |
IllegalStateException
IllegalStateException (Throwable cause)
Constructs a new exception with the specified cause and a detail
message of (cause==null ? null : cause.toString()) (which
typically contains the class and detail message of cause).
This constructor is useful for exceptions that are little more than
wrappers for other throwables (for example, PrivilegedActionException
).
Parameters |
cause |
Throwable :
the cause (which is saved for later retrieval by the
getCause() method). (A null value is
permitted, and indicates that the cause is nonexistent or
unknown.) |