public enum EFileIOErrorCode extends Enum<EFileIOErrorCode> implements ISuccessIndicator, IHasIntID
| Enum Constant and Description |
|---|
IO_ERROR
Generic IO code: an IOException occurred.
|
NO_ERROR
Generic error code: no error.
|
OBJECT_CANNOT_BE_HANDLED
We stumble across an object that is neither a file nor a directory.
|
OBJECT_HAS_NO_PARENT
An object's parent could not be retrieved.
|
OPERATION_FAILED
Generic error code: operation failed but we don't know why.
|
SECURITY_ERROR
Generic error code: a SecurityException occurred.
|
SOURCE_DOES_NOT_EXIST
A source file or directory does not exist.
|
SOURCE_EQUALS_TARGET
Source and destination object are identical.
|
SOURCE_NOT_READABLE
The source object cannot be read.
|
SOURCE_PARENT_NOT_WRITABLE
The source parent object is read-only (not writable).
|
TARGET_ALREADY_EXISTS
A destination file or directory already exists.
|
TARGET_IS_CHILD_OF_SOURCE
Avoid recursive dependencies.
|
TARGET_PARENT_NOT_WRITABLE
The target parent object is read-only (not writable).
|
| Modifier and Type | Method and Description |
|---|---|
FileIOError |
getAsIOError(EFileIOOperation eOperation,
File aFile)
Use this error code to create a new
FileIOError instance. |
FileIOError |
getAsIOError(EFileIOOperation eOperation,
File aFile1,
File aFile2)
Use this error code to create a new
FileIOError instance. |
static FileIOError |
getAsIOError(EFileIOOperation eOperation,
IOException ex)
Static method to create a
FileIOError for an IOException. |
FileIOError |
getAsIOError(EFileIOOperation eOperation,
Path aPath)
Use this error code to create a new
FileIOError instance. |
FileIOError |
getAsIOError(EFileIOOperation eOperation,
Path aFile1,
Path aFile2)
Use this error code to create a new
FileIOError instance. |
static FileIOError |
getAsIOError(EFileIOOperation eOperation,
UncheckedIOException ex)
Static method to create a
FileIOError for an
UncheckedIOException. |
static EFileIOErrorCode |
getFromIDOrNull(int nID) |
int |
getID()
An internal ID for easier referencing.
|
static FileIOError |
getSecurityAsIOError(EFileIOOperation eOperation,
SecurityException ex)
Static method to create a
FileIOError for a
SecurityException. |
boolean |
isSuccess() |
static EFileIOErrorCode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static EFileIOErrorCode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfand, isFailure, orgetComparatorID, getIDObjpublic static final EFileIOErrorCode NO_ERROR
public static final EFileIOErrorCode OPERATION_FAILED
public static final EFileIOErrorCode SECURITY_ERROR
public static final EFileIOErrorCode SOURCE_DOES_NOT_EXIST
public static final EFileIOErrorCode TARGET_ALREADY_EXISTS
public static final EFileIOErrorCode SOURCE_EQUALS_TARGET
public static final EFileIOErrorCode TARGET_IS_CHILD_OF_SOURCE
public static final EFileIOErrorCode OBJECT_CANNOT_BE_HANDLED
public static final EFileIOErrorCode OBJECT_HAS_NO_PARENT
public static final EFileIOErrorCode SOURCE_NOT_READABLE
public static final EFileIOErrorCode SOURCE_PARENT_NOT_WRITABLE
public static final EFileIOErrorCode TARGET_PARENT_NOT_WRITABLE
public static final EFileIOErrorCode IO_ERROR
public static EFileIOErrorCode[] values()
for (EFileIOErrorCode c : EFileIOErrorCode.values()) System.out.println(c);
public static EFileIOErrorCode valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is null@Nonnegative public int getID()
NO_ERROR has ID 0. All
errors have positive numbers.@Nonnull public FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull File aFile)
FileIOError instance.eOperation - The operation carried out. May not be null.aFile - The file on which operation was carried out. May not be
null.FileIOError and never null.@Nonnull public FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull Path aPath)
FileIOError instance.eOperation - The operation carried out. May not be null.aPath - The path on which operation was carried out. May not be
null.FileIOError and never null.@Nonnull public FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull File aFile1, @Nonnull File aFile2)
FileIOError instance.eOperation - The operation carried out. May not be null.aFile1 - The first file on which operation was carried out. May not be
null.aFile2 - The second file on which operation was carried out. May not be
null.FileIOError and never null.@Nonnull public FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull Path aFile1, @Nonnull Path aFile2)
FileIOError instance.eOperation - The operation carried out. May not be null.aFile1 - The first file on which operation was carried out. May not be
null.aFile2 - The second file on which operation was carried out. May not be
null.FileIOError and never null.public boolean isSuccess()
isSuccess in interface ISuccessIndicatortrue if this is NO_ERROR, false
otherwise.@Nonnull public static FileIOError getSecurityAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull SecurityException ex)
FileIOError for a
SecurityException.eOperation - The performed operation. May not be null.ex - The occurred SecurityException. Never null.null FileIOError.@Nonnull public static FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull IOException ex)
FileIOError for an IOException.eOperation - The performed operation. May not be null.ex - The occurred IOException. Never null.null FileIOError.@Nonnull public static FileIOError getAsIOError(@Nonnull EFileIOOperation eOperation, @Nonnull UncheckedIOException ex)
FileIOError for an
UncheckedIOException.eOperation - The performed operation. May not be null.ex - The occurred UncheckedIOException. Never null.null FileIOError.@Nullable public static EFileIOErrorCode getFromIDOrNull(int nID)
Copyright © 2014–2017 Philip Helger. All rights reserved.