org.tukaani.xz
Class MemoryLimitException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by org.tukaani.xz.XZIOException
                  extended by org.tukaani.xz.MemoryLimitException
All Implemented Interfaces:
java.io.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
MemoryLimitException(int memoryNeeded, int memoryLimit)
          Creates a new MemoryLimitException.
 
Method Summary
 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
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, 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)