net.sourceforge.openstego
Class OpenStegoException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by net.sourceforge.openstego.OpenStegoException
All Implemented Interfaces:
java.io.Serializable

public class OpenStegoException
extends java.lang.Exception

Custom exception class for OpenStego

See Also:
Serialized Form

Field Summary
static int CORRUPT_DATA
          Error Code - Corrupt Data
static int IMAGE_FILE_INVALID
          Error Code - Image file invalid
static int IMAGE_SIZE_MISMATCH
          Error Code - Image sizes mismatch
static int IMAGE_TYPE_INVALID
          Error Code - Image type invalid
static int INVALID_KEY_NAME
          Error Code - Invalid key name
static int INVALID_PASSWORD
          Error Code - Invalid password
static int INVALID_USE_COMPR_VALUE
          Error Code - Invalid value for useCompression
static int INVALID_USE_ENCRYPT_VALUE
          Error Code - Invalid value for useEncryption
static int NO_PLUGIN_SPECIFIED
          Error Code - No plugin specified
static int NO_VALID_PLUGIN
          Error Code - No valid plugin
static int OUT_OF_MEMORY
          Error Code - Out of memory
static int PLUGIN_NOT_FOUND
          Error Code - Plugin not found
static int SIG_NA_PLUGIN_NOT_WM
          Error Code - No plugin specified
 
Constructor Summary
OpenStegoException(java.lang.String namespace, int errorCode, java.lang.Object[] params, java.lang.Throwable cause)
          Constructor which takes object array for parameters for the message
OpenStegoException(java.lang.String namespace, int errorCode, java.lang.String param, java.lang.Throwable cause)
          Constructor with a single parameter for the message
OpenStegoException(java.lang.String namespace, int errorCode, java.lang.Throwable cause)
          Default constructor
OpenStegoException(java.lang.Throwable cause)
          Constructor using default namespace for unhandled exceptions
 
Method Summary
static void addErrorCode(java.lang.String namespace, int errorCode, java.lang.String labelKey)
          Method to add new error codes to the namespace
 int getErrorCode()
          Get method for errorCode
 java.lang.String getNamespace()
          Get method for namespace
 
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

INVALID_PASSWORD

public static final int INVALID_PASSWORD
Error Code - Invalid password

See Also:
Constant Field Values

INVALID_USE_COMPR_VALUE

public static final int INVALID_USE_COMPR_VALUE
Error Code - Invalid value for useCompression

See Also:
Constant Field Values

INVALID_USE_ENCRYPT_VALUE

public static final int INVALID_USE_ENCRYPT_VALUE
Error Code - Invalid value for useEncryption

See Also:
Constant Field Values

INVALID_KEY_NAME

public static final int INVALID_KEY_NAME
Error Code - Invalid key name

See Also:
Constant Field Values

CORRUPT_DATA

public static final int CORRUPT_DATA
Error Code - Corrupt Data

See Also:
Constant Field Values

NO_VALID_PLUGIN

public static final int NO_VALID_PLUGIN
Error Code - No valid plugin

See Also:
Constant Field Values

IMAGE_TYPE_INVALID

public static final int IMAGE_TYPE_INVALID
Error Code - Image type invalid

See Also:
Constant Field Values

IMAGE_FILE_INVALID

public static final int IMAGE_FILE_INVALID
Error Code - Image file invalid

See Also:
Constant Field Values

NO_PLUGIN_SPECIFIED

public static final int NO_PLUGIN_SPECIFIED
Error Code - No plugin specified

See Also:
Constant Field Values

SIG_NA_PLUGIN_NOT_WM

public static final int SIG_NA_PLUGIN_NOT_WM
Error Code - No plugin specified

See Also:
Constant Field Values

PLUGIN_NOT_FOUND

public static final int PLUGIN_NOT_FOUND
Error Code - Plugin not found

See Also:
Constant Field Values

IMAGE_SIZE_MISMATCH

public static final int IMAGE_SIZE_MISMATCH
Error Code - Image sizes mismatch

See Also:
Constant Field Values

OUT_OF_MEMORY

public static final int OUT_OF_MEMORY
Error Code - Out of memory

See Also:
Constant Field Values
Constructor Detail

OpenStegoException

public OpenStegoException(java.lang.Throwable cause)
Constructor using default namespace for unhandled exceptions

Parameters:
cause - Original exception which caused this exception to be raised

OpenStegoException

public OpenStegoException(java.lang.String namespace,
                          int errorCode,
                          java.lang.Throwable cause)
Default constructor

Parameters:
namespace - Namespace of the error
errorCode - Error code for the exception
cause - Original exception which caused this exception to be raised

OpenStegoException

public OpenStegoException(java.lang.String namespace,
                          int errorCode,
                          java.lang.String param,
                          java.lang.Throwable cause)
Constructor with a single parameter for the message

Parameters:
namespace - Namespace of the error
errorCode - Error code for the exception
param - Parameter for exception message
cause - Original exception which caused this exception to be raised

OpenStegoException

public OpenStegoException(java.lang.String namespace,
                          int errorCode,
                          java.lang.Object[] params,
                          java.lang.Throwable cause)
Constructor which takes object array for parameters for the message

Parameters:
namespace - Namespace of the error
errorCode - Error code for the exception
params - Parameters for exception message
cause - Original exception which caused this exception to be raised
Method Detail

getErrorCode

public int getErrorCode()
Get method for errorCode

Returns:
errorCode

getNamespace

public java.lang.String getNamespace()
Get method for namespace

Returns:
namespace

addErrorCode

public static void addErrorCode(java.lang.String namespace,
                                int errorCode,
                                java.lang.String labelKey)
Method to add new error codes to the namespace

Parameters:
namespace - Namespace for the error
errorCode - Error code of the error
labelKey - Key of the label for the error


Copyright © 2007-2009 Samir Vaidya. All Rights Reserved.