Package java.lang
Class StringIndexOutOfBoundsException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IndexOutOfBoundsException
java.lang.StringIndexOutOfBoundsException
- All Implemented Interfaces:
Serializable
public class StringIndexOutOfBoundsException extends IndexOutOfBoundsException
Thrown when the a string is indexed with a value less than zero, or greater
than or equal to the size of the array.
- See Also:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description StringIndexOutOfBoundsException()Constructs a newStringIndexOutOfBoundsExceptionthat includes the current stack trace.StringIndexOutOfBoundsException(int index)Constructs a newStringIndexOutOfBoundsExceptionwith the current stack trace and a detail message that is based on the specified invalidindex.StringIndexOutOfBoundsException(int sourceLength, int index)Used internally for consistent high-quality error reporting.StringIndexOutOfBoundsException(int sourceLength, int offset, int count)Used internally for consistent high-quality error reporting.StringIndexOutOfBoundsException(String detailMessage)Constructs a newStringIndexOutOfBoundsExceptionwith the current stack trace and the specified detail message.StringIndexOutOfBoundsException(String s, int index)Used internally for consistent high-quality error reporting.StringIndexOutOfBoundsException(String s, int offset, int count)Used internally for consistent high-quality error reporting. -
Method Summary
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException()Constructs a newStringIndexOutOfBoundsExceptionthat includes the current stack trace. -
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException(int index)Constructs a newStringIndexOutOfBoundsExceptionwith the current stack trace and a detail message that is based on the specified invalidindex.- Parameters:
index- the index which is out of bounds.
-
StringIndexOutOfBoundsException
Constructs a newStringIndexOutOfBoundsExceptionwith the current stack trace and the specified detail message.- Parameters:
detailMessage- the detail message for this exception.
-
StringIndexOutOfBoundsException
Used internally for consistent high-quality error reporting. -
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException(int sourceLength, int index)Used internally for consistent high-quality error reporting. -
StringIndexOutOfBoundsException
Used internally for consistent high-quality error reporting. -
StringIndexOutOfBoundsException
public StringIndexOutOfBoundsException(int sourceLength, int offset, int count)Used internally for consistent high-quality error reporting.
-