net.rim.device.api.io.file
Class FileIOException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by net.rim.device.api.io.file.FileIOException

public class FileIOException
extends IOException

FileIOException is a subclass of IOException, which can be used to provide more detail without having to rely on parsing a string. The error code of the IOException can be retrieved via the FileIOException.getErrorCode() method.

Since:
BlackBerry API 4.2.0

Field Summary
static int CONTENT_BUILT_IN
          The operation is not allowed because the content is built-in (preloaded).
static int DIRECTORY_ALREADY_EXISTS
          The directory already exists.
static int DIRECTORY_FULL
          The directory is full.
static int DIRECTORY_NOT_EMPTY
          The directory is not empty.
static int DIRECTORY_NOT_FOUND
          The directory cannot be found.
static int DIRPATH_TOO_LONG
          The directory path is too long.
static int FILENAME_ALREADY_EXISTS
          The filename already exists.
static int FILENAME_NOT_FOUND
          The filename cannot be found.
static int FILENAME_TOO_LONG
          The filename is too long.
static int FILEPATH_TOO_LONG
          The full file path is too long.
static int FILESYSTEM_EMPTY
          The file system is empty.
static int FILESYSTEM_FULL
          The file system is full.
static int FILE_BUSY
          The operation failed because the file is currently open.
static int FILE_HANDLES_OPEN
          The file handle used is already open.
static int FILE_NOT_OPEN
          The file is no longer open.
static int FILE_SYSTEM_UNAVAILABLE
          The file system is unavailable.
static int FILE_TOO_LARGE
          The operation failed because the file is too large for the system.
static int FS_ALREADY_MOUNTED
          The file system is already mounted.
static int FS_LOCKED_BY_OTHER_DEVICE
          The operation failed because the sdcard is already locked by another device.
static int FS_NOT_MOUNTED
          The file system is not mounted.
static int FS_VERIFICATION_FAILED
          The file system failed to be mounted because of a verification error.
static int GENERAL_ERROR
          A general error occurred.
static int INVALID_CHARACTERS
          The string specified contains invalid characters.
static int INVALID_HANDLE
          The file system handle used in the file operation is currently invalid.
static int INVALID_OPERATION
          The operation requested is invalid.
static int INVALID_PARAMETER
          The file system received an invalid parameter.
static int IS_A_DIRECTORY
          The filename requested is a directory.
static int MEDIUM_NOT_FORMATTED
          The medium is not formatted.
static int NOT_A_DIRECTORY
          The path requested is not a directory.
static int NOT_A_FILE
          The path requested is not a file.
static int NO_FREE_HANDLES
          There are no more free handles.
static int NO_SUCH_ROOT
          The root specified is not available.
static int OS_BUSY
          The operating system is busy.
static int SERVER_ERROR
          The operation failed because the server had an internal error.
static int STREAM_ALREADY_OPENED
          The requested stream is already open.
 
Constructor Summary
FileIOException(int errorCode)
          Create a FileIOException with the specified error code.
 
Method Summary
 int getErrorCode()
          Retrieves the error code.
 String getMessage()
          Retrieves the associated error message.
 
Methods inherited from class java.lang.Throwable
printStackTrace, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 



Field Detail

INVALID_HANDLE

public static final int INVALID_HANDLE
The file system handle used in the file operation is currently invalid.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

INVALID_PARAMETER

public static final int INVALID_PARAMETER
The file system received an invalid parameter.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILE_SYSTEM_UNAVAILABLE

public static final int FILE_SYSTEM_UNAVAILABLE
The file system is unavailable.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

OS_BUSY

public static final int OS_BUSY
The operating system is busy.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

GENERAL_ERROR

public static final int GENERAL_ERROR
A general error occurred.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILENAME_ALREADY_EXISTS

public static final int FILENAME_ALREADY_EXISTS
The filename already exists.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILENAME_NOT_FOUND

public static final int FILENAME_NOT_FOUND
The filename cannot be found.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILESYSTEM_FULL

public static final int FILESYSTEM_FULL
The file system is full.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILESYSTEM_EMPTY

public static final int FILESYSTEM_EMPTY
The file system is empty.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

NO_FREE_HANDLES

public static final int NO_FREE_HANDLES
There are no more free handles.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

INVALID_OPERATION

public static final int INVALID_OPERATION
The operation requested is invalid.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILENAME_TOO_LONG

public static final int FILENAME_TOO_LONG
The filename is too long.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILEPATH_TOO_LONG

public static final int FILEPATH_TOO_LONG
The full file path is too long.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

DIRPATH_TOO_LONG

public static final int DIRPATH_TOO_LONG
The directory path is too long.

See Also:
Constant Field Values
Since:
BlackBerry API 5.0.0

DIRECTORY_FULL

public static final int DIRECTORY_FULL
The directory is full.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

DIRECTORY_ALREADY_EXISTS

public static final int DIRECTORY_ALREADY_EXISTS
The directory already exists.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

DIRECTORY_NOT_FOUND

public static final int DIRECTORY_NOT_FOUND
The directory cannot be found.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

DIRECTORY_NOT_EMPTY

public static final int DIRECTORY_NOT_EMPTY
The directory is not empty.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

MEDIUM_NOT_FORMATTED

public static final int MEDIUM_NOT_FORMATTED
The medium is not formatted.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FS_ALREADY_MOUNTED

public static final int FS_ALREADY_MOUNTED
The file system is already mounted.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILE_HANDLES_OPEN

public static final int FILE_HANDLES_OPEN
The file handle used is already open.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FS_NOT_MOUNTED

public static final int FS_NOT_MOUNTED
The file system is not mounted.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FS_VERIFICATION_FAILED

public static final int FS_VERIFICATION_FAILED
The file system failed to be mounted because of a verification error.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.1

FILE_BUSY

public static final int FILE_BUSY
The operation failed because the file is currently open.

See Also:
Constant Field Values
Since:
BlackBerry API 4.5.0

FILE_NOT_OPEN

public static final int FILE_NOT_OPEN
The file is no longer open.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

NOT_A_FILE

public static final int NOT_A_FILE
The path requested is not a file.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

NOT_A_DIRECTORY

public static final int NOT_A_DIRECTORY
The path requested is not a directory.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

NO_SUCH_ROOT

public static final int NO_SUCH_ROOT
The root specified is not available.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

INVALID_CHARACTERS

public static final int INVALID_CHARACTERS
The string specified contains invalid characters.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

STREAM_ALREADY_OPENED

public static final int STREAM_ALREADY_OPENED
The requested stream is already open.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

IS_A_DIRECTORY

public static final int IS_A_DIRECTORY
The filename requested is a directory.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

CONTENT_BUILT_IN

public static final int CONTENT_BUILT_IN
The operation is not allowed because the content is built-in (preloaded).

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FILE_TOO_LARGE

public static final int FILE_TOO_LARGE
The operation failed because the file is too large for the system.

See Also:
Constant Field Values
Since:
BlackBerry API 4.2.0

FS_LOCKED_BY_OTHER_DEVICE

public static final int FS_LOCKED_BY_OTHER_DEVICE
The operation failed because the sdcard is already locked by another device.

See Also:
Constant Field Values
Since:
BlackBerry API 4.6.0

SERVER_ERROR

public static final int SERVER_ERROR
The operation failed because the server had an internal error.

See Also:
Constant Field Values
Since:
BlackBerry API 6.0.0


Constructor Detail

FileIOException

public FileIOException(int errorCode)
Create a FileIOException with the specified error code.

Parameters:
errorCode - The error code is an enumeration of constants exposed in this class.
Since:
BlackBerry API 4.2.0


Method Detail

getErrorCode

public int getErrorCode()
Retrieves the error code.

Returns:
The error code.
Since:
BlackBerry API 4.2.0

getMessage

public String getMessage()
Retrieves the associated error message.

Overrides:
getMessage in class Throwable
Returns:
The associated textual error message.
Since:
BlackBerry API 4.2.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.