APIdia Launch Partner
Top Description Fields Constructors Methods
java.nio.file

public Class FileSystemException

extends IOException
Class Inheritance
Known Direct Subclasses
java.nio.file.FileSystemLoopException, java.nio.file.NoSuchFileException, java.nio.file.NotDirectoryException, java.nio.file.NotLinkException, java.nio.file.AccessDeniedException, java.nio.file.AtomicMoveNotSupportedException, java.nio.file.DirectoryNotEmptyException, java.nio.file.FileAlreadyExistsException
Imports
java.io.IOException

Thrown when a file system operation fails on one or two files. This class is the general class for file system exceptions.
Since
1.7

Field Summary

Modifier and TypeField and Description
private final String
private final String
pack-priv static final long

Constructor Summary

AccessConstructor and Description
public
FileSystemException(String
a string identifying the file or null if not known.
file
)

Constructs an instance of this class.

public
FileSystemException(String
a string identifying the file or null if not known.
file
,
String
a string identifying the other file or null if there isn't another file or if not known
other
,
String
a reason message with additional information or null
reason
)

Constructs an instance of this class.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

the file (can be null)
getFile
()

Returns the file used to create this exception.

public String
getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string.

public String

Returns:

the other file (can be null)
getOtherFile
()

Returns the other file used to create this exception.

public String

Returns:

the string explaining why the file system operation failed
getReason
()

Returns the string explaining why the file system operation failed.

Field Detail

fileback to summary
private final String file
otherback to summary
private final String other
serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.io.IOException.serialVersionUID.

Annotations
@Serial

Constructor Detail

FileSystemExceptionback to summary
public FileSystemException(String file)

Constructs an instance of this class. This constructor should be used when an operation involving one file fails and there isn't any additional information to explain the reason.

Parameters
file:String

a string identifying the file or null if not known.

FileSystemExceptionback to summary
public FileSystemException(String file, String other, String reason)

Constructs an instance of this class. This constructor should be used when an operation involving two files fails, or there is additional information to explain the reason.

Parameters
file:String

a string identifying the file or null if not known.

other:String

a string identifying the other file or null if there isn't another file or if not known

reason:String

a reason message with additional information or null

Method Detail

getFileback to summary
public String getFile()

Returns the file used to create this exception.

Returns:String

the file (can be null)

getMessageback to summary
public String getMessage()

Overrides java.lang.Throwable.getMessage.

Returns the detail message string.

Annotations
@Override
getOtherFileback to summary
public String getOtherFile()

Returns the other file used to create this exception.

Returns:String

the other file (can be null)

getReasonback to summary
public String getReason()

Returns the string explaining why the file system operation failed.

Returns:String

the string explaining why the file system operation failed