Top Description Fields Constructors Methods
java.nio.file

public Class FileAlreadyExistsException

extends FileSystemException
Class Inheritance

Checked exception thrown when an attempt is made to create a file or directory and a file of that name already exists.
Since
1.7

Field Summary

Modifier and TypeField and Description
pack-priv static final long

Constructor Summary

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

Constructs an instance of this class.

public
FileAlreadyExistsException(String
a string identifying the file or null if not known
file
,
String
a string identifying the other file or null if not known
other
,
String
a reason message with additional information or null
reason
)

Constructs an instance of this class.

Method Summary

Inherited from java.nio.file.FileSystemException:
getFilegetMessagegetOtherFilegetReason

Field Detail

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides java.nio.file.FileSystemException.serialVersionUID.

Annotations
@Serial

Constructor Detail

FileAlreadyExistsExceptionback to summary
public FileAlreadyExistsException(String file)

Constructs an instance of this class.

Parameters
file:String

a string identifying the file or null if not known

FileAlreadyExistsExceptionback to summary
public FileAlreadyExistsException(String file, String other, String reason)

Constructs an instance of this class.

Parameters
file:String

a string identifying the file or null if not known

other:String

a string identifying the other file or null if not known

reason:String

a reason message with additional information or null