org.bs.mdi
Class FileIOException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byorg.bs.mdi.FileIOException
All Implemented Interfaces:
Serializable

public class FileIOException
extends Exception

FileIOExceptions can happen during loading, saving or exporting files.

See Also:
Serialized Form

Field Summary
static int ERR_NOACCESS
           
static int ERR_NOSUCHFILE
           
static int ERR_UNKNOWN
           
static int ERR_UNSUPPORTEDFORMAT
           
 
Constructor Summary
FileIOException(int reason, String filename)
          Creates a new FileException.
 
Method Summary
 String getFilename()
          Returns the filename which this exception concerns.
 String getLocalizedMessage()
          Returns a localized error message.
 int getReason()
          Returns the reason why this exception was thrown.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, 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

ERR_UNSUPPORTEDFORMAT

public static final int ERR_UNSUPPORTEDFORMAT
See Also:
Constant Field Values

ERR_NOACCESS

public static final int ERR_NOACCESS
See Also:
Constant Field Values

ERR_NOSUCHFILE

public static final int ERR_NOSUCHFILE
See Also:
Constant Field Values

ERR_UNKNOWN

public static final int ERR_UNKNOWN
See Also:
Constant Field Values
Constructor Detail

FileIOException

public FileIOException(int reason,
                       String filename)
Creates a new FileException.

Parameters:
reason - the reason for the failure
filename - the filename which was attempted to be loaded, saved or exported
Method Detail

getFilename

public String getFilename()
Returns the filename which this exception concerns.

Returns:
the filename

getReason

public int getReason()
Returns the reason why this exception was thrown.

Returns:
the reason

getLocalizedMessage

public String getLocalizedMessage()
Returns a localized error message.

Returns:
the localized error message