|
JAFS API v2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.lang.Throwable | +--java.lang.Exception | +--java.io.IOException | +--org.openafs.jafs.AFSFileException
An exception indicating that a file related error has occured in the Java AFS API, in the Java AFS JNI, or in the AFS file system.
This exception extends Java's java.io.IOException
and is therefore often used as a substitution for
IOException
.
AFSException
,
IOException
,
Serialized FormField Summary | |
protected int |
errno
The AFS specific error number (code). |
Fields inherited from class java.lang.Exception |
|
Constructor Summary | |
AFSFileException(int errno)
Constructs an AFSFileException with the specified error
code. |
|
AFSFileException(String reason)
Constructs an AFSFileException with the specified detail
message. |
|
AFSFileException(String reason,
int errno)
Constructs an AFSFileException with the specified detail
message and specified error code. |
Method Summary | |
String |
getAFSMessage()
Returns the AFS error message string defined by the ErrorTable
class. |
String |
getAFSMessage(Locale locale)
Returns the AFS error message defined by the ErrorTable
class. |
int |
getErrorCode()
Returns the AFS specific error number (code). |
String |
getMessage()
Returns the error message string of this exception. |
String |
getMessage(Locale locale)
Returns the locale specific error message string of this exception. |
String |
toString()
Returns a string representation of this AFS Exception. |
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected int errno
getErrorCode()
Constructor Detail |
public AFSFileException(String reason)
AFSFileException
with the specified detail
message.
reason
- the detail message.public AFSFileException(int errno)
AFSFileException
with the specified error
code. This constructor will also generate the appropriate error message
respective to the specified error code.
errno
- the AFS error number (error code).public AFSFileException(String reason, int errno)
AFSFileException
with the specified detail
message and specified error code. In this constructor the specified
detail message overrides the default AFS error message defined by the
ErrorTable
class. Therefore, to retrieve the AFS specific
error message, you must use the getAFSMessage()
method. The getMessage()
method will return
the message specified in this constructor.
reason
- the detail message.errno
- the AFS error number (error code).getAFSMessage()
Method Detail |
public int getErrorCode()
ErrorTable
class method
ErrorTable.getMessage(int)
.
AFSException
object.ErrorTable.getMessage(int)
public String getMessage()
getMessage
in class Throwable
getAFSMessage()
public String getMessage(Locale locale)
locale
- the locale for which this message will be displayed
getAFSMessage()
public String getAFSMessage()
ErrorTable
class. The message will be formatted according to the default
Locale.
This message is also available from this object's super class
method getMessage
. However, this method will always return
the string message associated with the actual AFS error code/number
specified, whereas the getMessage()
method will return the
string message intended for this Exception object, which may be
an overridden message defined in the constructor of this Exception.
getAFSMessage(Locale)
,
AFSFileException(String, int)
,
ErrorTable.getMessage(int)
,
Throwable.getMessage()
public String getAFSMessage(Locale locale)
ErrorTable
class. The message will be formatted according to the specified Locale.
This message is also available from this object's super class
method getMessage
. However, this method will always return
the string message associated with the actual AFS error code/number
specified, whereas the getMessage()
method will return the
string message intended for this Exception object, which may be
an overridden message defined in the constructor of this Exception.
locale
- the locale for which this message will be displayed
getAFSMessage()
,
AFSFileException(String, int)
,
ErrorTable.getMessage(int, Locale)
,
Throwable.getMessage()
public String toString()
toString
in class Throwable
AFSFileException
object.getMessage()
|
JAFS API v2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |