org.tukaani.xz

## Class MemoryLimitException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - java.io.IOException
      - - org.tukaani.xz.XZIOException
        - - org.tukaani.xz.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 Summary

Constructors
Constructor and Description
`MemoryLimitException(int memoryNeeded, int memoryLimit)` Creates a new MemoryLimitException.

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `getMemoryLimit()` Gets what the memory usage limit was at the time the exception was created.
`int` `getMemoryNeeded()` Gets how much memory is required to decompress the data.

### Methods inherited from class java.lang.Throwable

`addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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)