net.sourceforge.openstego
Class OpenStegoException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended bynet.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 ERR_IMAGE_DATA_READ
          Error Code - Error while reading image data
static int IMAGE_FILE_INVALID
          Error Code - Image file invalid
static int IMAGE_SIZE_INSUFFICIENT
          Error Code - Image size insufficient for data
static int IMAGE_TYPE_INVALID
          Error Code - Image type invalid
static int INVALID_HEADER_VERSION
          Error Code - Invalid image header version
static int INVALID_KEY_NAME
          Error Code - Invalid key name
static int INVALID_PASSWORD
          Error Code - Invalid password
static int INVALID_STEGO_HEADER
          Error Code - Invalid stego header data
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 MAX_BITS_NOT_IN_RANGE
          Error Code - maxBitsUsedPerChannel is not in valid range
static int MAX_BITS_NOT_NUMBER
          Error Code - maxBitsUsedPerChannel is not a number
static int NULL_IMAGE_ARGUMENT
          Error Code - Null value provided for image
static int UNHANDLED_EXCEPTION
          Error Code - Unhandled exception
 
Constructor Summary
OpenStegoException(int errorCode, java.lang.Object[] params, java.lang.Throwable cause)
          Constructor which takes object array for parameters for the message
OpenStegoException(int errorCode, java.lang.String param, java.lang.Throwable cause)
          Constructor with a single parameter for the message
OpenStegoException(int errorCode, java.lang.Throwable cause)
          Default constructor
 
Method Summary
 int getErrorCode()
          Get method for errorCode
 
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

UNHANDLED_EXCEPTION

public static final int UNHANDLED_EXCEPTION
Error Code - Unhandled exception

See Also:
Constant Field Values

INVALID_PASSWORD

public static final int INVALID_PASSWORD
Error Code - Invalid password

See Also:
Constant Field Values

ERR_IMAGE_DATA_READ

public static final int ERR_IMAGE_DATA_READ
Error Code - Error while reading image data

See Also:
Constant Field Values

MAX_BITS_NOT_NUMBER

public static final int MAX_BITS_NOT_NUMBER
Error Code - maxBitsUsedPerChannel is not a number

See Also:
Constant Field Values

MAX_BITS_NOT_IN_RANGE

public static final int MAX_BITS_NOT_IN_RANGE
Error Code - maxBitsUsedPerChannel is not in valid range

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

INVALID_STEGO_HEADER

public static final int INVALID_STEGO_HEADER
Error Code - Invalid stego header data

See Also:
Constant Field Values

NULL_IMAGE_ARGUMENT

public static final int NULL_IMAGE_ARGUMENT
Error Code - Null value provided for image

See Also:
Constant Field Values

IMAGE_SIZE_INSUFFICIENT

public static final int IMAGE_SIZE_INSUFFICIENT
Error Code - Image size insufficient for data

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

IMAGE_TYPE_INVALID

public static final int IMAGE_TYPE_INVALID
Error Code - Image type invalid

See Also:
Constant Field Values

INVALID_HEADER_VERSION

public static final int INVALID_HEADER_VERSION
Error Code - Invalid image header version

See Also:
Constant Field Values
Constructor Detail

OpenStegoException

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

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

OpenStegoException

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

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

OpenStegoException

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

Parameters:
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