Class MemoryLimitException

  • All Implemented Interfaces:
    Serializable

    public class MemoryLimitException
    extends XZIOException
    Thrown when the memory usage limit given to the XZ decompressor would be exceeded.

    The amount of memory required and the memory usage limit are included in the error detail message in human readable format.

    See Also:
    Serialized Form
    • Constructor Detail

      • MemoryLimitException

        public MemoryLimitException​(int memoryNeeded,
                                    int memoryLimit)
        Creates a new MemoryLimitException.

        The amount of memory needed and the memory usage limit are included in the error detail message.

        Parameters:
        memoryNeeded - amount of memory needed as kibibytes (KiB)
        memoryLimit - specified memory usage limit as kibibytes (KiB)
    • Method Detail

      • getMemoryNeeded

        public int getMemoryNeeded()
        Gets how much memory is required to decompress the data.
        Returns:
        amount of memory needed as kibibytes (KiB)
      • getMemoryLimit

        public int getMemoryLimit()
        Gets what the memory usage limit was at the time the exception was created.
        Returns:
        memory usage limit as kibibytes (KiB)