Class TooLargeArrayException

All Implemented Interfaces:
Serializable

public class TooLargeArrayException extends RuntimeException

Unchecked exception thrown if the current or desired array length is extremely large. It is thrown by methods, creating new arrays or resizing existing arrays, if the desired array length is too large (regardless of the amount of memory, for example, greater than Long.MAX_VALUE), or by methods trying to convert the array into a Java array (as Arrays.toJavaArray(Array)), if the array is too large for storing its content in a form of Java array (Java arrays can contain, as a maximum, Integer.MAX_VALUE (231-1) elements).

Author:
Daniel Alievsky
See Also:
  • Constructor Details

    • TooLargeArrayException

      public TooLargeArrayException()
      Constructs an instance of this class.
    • TooLargeArrayException

      public TooLargeArrayException(String message)
      Constructs an instance of this class with the specified detail message.
      Parameters:
      message - the detail message.