Package com.openstego.desktop
Class OpenStegoException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- com.openstego.desktop.OpenStegoException
-
- All Implemented Interfaces:
java.io.Serializable
public class OpenStegoException extends java.lang.ExceptionCustom exception class for OpenStego- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static intCORRUPT_DATAError Code - Corrupt Datastatic intIMAGE_FILE_INVALIDError Code - Image file invalidstatic intIMAGE_SIZE_MISMATCHError Code - Image sizes mismatchstatic intIMAGE_TYPE_INVALIDError Code - Image type invalidstatic intINVALID_CRYPT_ALGOError Code - Invalid key namestatic intINVALID_KEY_NAMEError Code - Invalid key namestatic intINVALID_PASSWORDError Code - Invalid passwordstatic intINVALID_USE_COMPR_VALUEError Code - Invalid value for useCompressionstatic intINVALID_USE_ENCRYPT_VALUEError Code - Invalid value for useEncryptionstatic intNO_PLUGIN_SPECIFIEDError Code - No plugin specifiedstatic intNO_VALID_PLUGINError Code - No valid pluginstatic intOUT_OF_MEMORYError Code - Out of memorystatic intPLUGIN_DOES_NOT_SUPPORT_DHError Code - Plugin does not support data hidingstatic intPLUGIN_DOES_NOT_SUPPORT_WMError Code - Plugin does not support watermarkingstatic intPLUGIN_NOT_FOUNDError Code - Plugin not foundstatic intPWD_MANDATORY_FOR_GENSIGError Code - Password is mandatory for 'gensig' operationstatic intUSERPREF_INVALID_BOOLError Code - Invalid boolean in user preference filestatic intUSERPREF_INVALID_FLOATError Code - Invalid float in user preference filestatic intUSERPREF_INVALID_INTError Code - Invalid integer in user preference file
-
Constructor Summary
Constructors Constructor Description OpenStegoException(java.lang.Throwable cause)Constructor using default namespace for unhandled exceptionsOpenStegoException(java.lang.Throwable cause, java.lang.String namespace, int errorCode)Default constructorOpenStegoException(java.lang.Throwable cause, java.lang.String namespace, int errorCode, java.lang.Object... params)Constructor which takes object array for parameters for the messageOpenStegoException(java.lang.Throwable cause, java.lang.String namespace, int errorCode, java.lang.String param)Constructor with a single parameter for the message
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddErrorCode(java.lang.String namespace, int errorCode, java.lang.String labelKey)Method to add new error codes to the namespaceintgetErrorCode()Get method for errorCodejava.lang.StringgetNamespace()Get method for namespace
-
-
-
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
-
PLUGIN_DOES_NOT_SUPPORT_WM
public static final int PLUGIN_DOES_NOT_SUPPORT_WM
Error Code - Plugin does not support watermarking- 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
-
PLUGIN_DOES_NOT_SUPPORT_DH
public static final int PLUGIN_DOES_NOT_SUPPORT_DH
Error Code - Plugin does not support data hiding- See Also:
- Constant Field Values
-
PWD_MANDATORY_FOR_GENSIG
public static final int PWD_MANDATORY_FOR_GENSIG
Error Code - Password is mandatory for 'gensig' operation- See Also:
- Constant Field Values
-
INVALID_CRYPT_ALGO
public static final int INVALID_CRYPT_ALGO
Error Code - Invalid key name- See Also:
- Constant Field Values
-
USERPREF_INVALID_INT
public static final int USERPREF_INVALID_INT
Error Code - Invalid integer in user preference file- See Also:
- Constant Field Values
-
USERPREF_INVALID_FLOAT
public static final int USERPREF_INVALID_FLOAT
Error Code - Invalid float in user preference file- See Also:
- Constant Field Values
-
USERPREF_INVALID_BOOL
public static final int USERPREF_INVALID_BOOL
Error Code - Invalid boolean in user preference file- 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.Throwable cause, java.lang.String namespace, int errorCode)Default constructor- Parameters:
cause- Original exception which caused this exception to be raisednamespace- Namespace of the errorerrorCode- Error code for the exception
-
OpenStegoException
public OpenStegoException(java.lang.Throwable cause, java.lang.String namespace, int errorCode, java.lang.String param)Constructor with a single parameter for the message- Parameters:
cause- Original exception which caused this exception to be raisednamespace- Namespace of the errorerrorCode- Error code for the exceptionparam- Parameter for exception message
-
OpenStegoException
public OpenStegoException(java.lang.Throwable cause, java.lang.String namespace, int errorCode, java.lang.Object... params)Constructor which takes object array for parameters for the message- Parameters:
cause- Original exception which caused this exception to be raisednamespace- Namespace of the errorerrorCode- Error code for the exceptionparams- Parameters for exception message
-
-
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 errorerrorCode- Error code of the errorlabelKey- Key of the label for the error
-
-