com.groovemanager.spi.rex
Class REXError

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by com.groovemanager.spi.rex.REXError
All Implemented Interfaces:
java.io.Serializable

final class REXError
extends java.lang.Exception

This Exception class provides a collection of all the REXError error codes that can be returned by calls to the REX API. An instance of this class can be thrown, if the returned error code was not expected.

Author:
Manu Robledo

Field Summary
(package private) static int APITooOld
          REXError constants
(package private) static int BufferTooSmall
          REXError constants
private  int code
          The REXError constant that caused this Exception
(package private) static int DLLAlreadyLoaded
          REXError constants
(package private) static int DLLNotFound
          REXError constants
(package private) static int DLLNotLoaded
          REXError constants
(package private) static int DLLTooOld
          REXError constants
(package private) static int FileCorrupt
          REXError constants
(package private) static int FileHasZeroLoopLength
          REXError constants
(package private) static int InvalidArgument
          REXError constants
(package private) static int InvalidHandle
          REXError constants
(package private) static int InvalidSampleRate
          REXError constants
(package private) static int InvalidSize
          REXError constants
(package private) static int InvalidSlice
          REXError constants
(package private) static int InvalidTempo
          REXError constants
(package private) static int IsBeingPreviewed
          REXError constants
(package private) static int NoCreatorInfoAvailable
          REXError constants
(package private) static int NoError
          REXError constants
(package private) static int NotBeingPreviewed
          REXError constants
(package private) static int NotEnoughMemoryForDLL
          REXError constants
(package private) static int OperationAbortedByUser
          REXError constants
(package private) static int OSVersionNotSupported
          REXError constants
(package private) static int OutOfMemory
          REXError constants
(package private) static int REX2FileTooNew
          REXError constants
(package private) static int UnableToLoadDLL
          REXError constants
 
Constructor Summary
private REXError(int code)
          Private constructor.
 
Method Summary
private static int APITooOld()
           
private static int BufferTooSmall()
           
private static int DLLAlreadyLoaded()
           
private static int DLLNotFound()
           
private static int DLLNotLoaded()
           
private static int DLLTooOld()
           
private static int FileCorrupt()
           
private static int FileHasZeroLoopLength()
           
(package private)  int getCode()
          Get the REXError constant that caused this Exception
(package private) static java.lang.String getMessage(int code)
          Get an error message out of a REXError constant
private static int InvalidArgument()
           
private static int InvalidHandle()
           
private static int InvalidSampleRate()
           
private static int InvalidSize()
           
private static int InvalidSlice()
           
private static int InvalidTempo()
           
private static int IsBeingPreviewed()
           
private static int NoCreatorInfoAvailable()
           
private static int NoError()
           
private static int NotBeingPreviewed()
           
private static int NotEnoughMemoryForDLL()
           
private static int OperationAbortedByUser()
           
private static int OSVersionNotSupported()
           
private static int OutOfMemory()
           
private static int REX2FileTooNew()
           
(package private) static void throwREXError(int code)
          Verify of the result from a call to an element of the REX API succeded or returned an error code.
private static int UnableToLoadDLL()
           
 
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
 

Field Detail

APITooOld

static final int APITooOld
REXError constants


BufferTooSmall

static final int BufferTooSmall
REXError constants


code

private int code
The REXError constant that caused this Exception


DLLAlreadyLoaded

static final int DLLAlreadyLoaded
REXError constants


DLLNotFound

static final int DLLNotFound
REXError constants


DLLNotLoaded

static final int DLLNotLoaded
REXError constants


DLLTooOld

static final int DLLTooOld
REXError constants


FileCorrupt

static final int FileCorrupt
REXError constants


FileHasZeroLoopLength

static final int FileHasZeroLoopLength
REXError constants


InvalidArgument

static final int InvalidArgument
REXError constants


InvalidHandle

static final int InvalidHandle
REXError constants


InvalidSampleRate

static final int InvalidSampleRate
REXError constants


InvalidSize

static final int InvalidSize
REXError constants


InvalidSlice

static final int InvalidSlice
REXError constants


InvalidTempo

static final int InvalidTempo
REXError constants


IsBeingPreviewed

static final int IsBeingPreviewed
REXError constants


NoCreatorInfoAvailable

static final int NoCreatorInfoAvailable
REXError constants


NoError

static final int NoError
REXError constants


NotBeingPreviewed

static final int NotBeingPreviewed
REXError constants


NotEnoughMemoryForDLL

static final int NotEnoughMemoryForDLL
REXError constants


OperationAbortedByUser

static final int OperationAbortedByUser
REXError constants


OSVersionNotSupported

static final int OSVersionNotSupported
REXError constants


OutOfMemory

static final int OutOfMemory
REXError constants


REX2FileTooNew

static final int REX2FileTooNew
REXError constants


UnableToLoadDLL

static final int UnableToLoadDLL
REXError constants

Constructor Detail

REXError

private REXError(int code)
Private constructor. Can only be called from throwREXError()

Parameters:
code - The REXError constant that occured
Method Detail

APITooOld

private static int APITooOld()

BufferTooSmall

private static int BufferTooSmall()

DLLAlreadyLoaded

private static int DLLAlreadyLoaded()

DLLNotFound

private static int DLLNotFound()

DLLNotLoaded

private static int DLLNotLoaded()

DLLTooOld

private static int DLLTooOld()

FileCorrupt

private static int FileCorrupt()

FileHasZeroLoopLength

private static int FileHasZeroLoopLength()

getCode

int getCode()
Get the REXError constant that caused this Exception

Returns:
The REXError constant that caused this Exception

getMessage

static java.lang.String getMessage(int code)
Get an error message out of a REXError constant

Parameters:
code - The REXError constant
Returns:
An error message

InvalidArgument

private static int InvalidArgument()

InvalidHandle

private static int InvalidHandle()

InvalidSampleRate

private static int InvalidSampleRate()

InvalidSize

private static int InvalidSize()

InvalidSlice

private static int InvalidSlice()

InvalidTempo

private static int InvalidTempo()

IsBeingPreviewed

private static int IsBeingPreviewed()

NoCreatorInfoAvailable

private static int NoCreatorInfoAvailable()

NoError

private static int NoError()

NotBeingPreviewed

private static int NotBeingPreviewed()

NotEnoughMemoryForDLL

private static int NotEnoughMemoryForDLL()

OperationAbortedByUser

private static int OperationAbortedByUser()

OSVersionNotSupported

private static int OSVersionNotSupported()

OutOfMemory

private static int OutOfMemory()

REX2FileTooNew

private static int REX2FileTooNew()

throwREXError

static void throwREXError(int code)
                   throws REXError
Verify of the result from a call to an element of the REX API succeded or returned an error code. If an error is detected, a REXError will be thrown

Parameters:
code - The REXError constant returned by the native function
Throws:
REXError - If the constant is not the same as NoError

UnableToLoadDLL

private static int UnableToLoadDLL()