Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/sftp/ErrorCodes.java @ 307:071eccdff8ea ganymed
fix java formatting
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 14:16:58 -0700 |
parents | 91a31873c42a |
children |
comparison
equal
deleted
inserted
replaced
305:d2b303406d63 | 307:071eccdff8ea |
---|---|
51 public static final int SSH_FX_GROUP_INVALID = 30; | 51 public static final int SSH_FX_GROUP_INVALID = 30; |
52 public static final int SSH_FX_NO_MATCHING_BYTE_RANGE_LOCK = 31; | 52 public static final int SSH_FX_NO_MATCHING_BYTE_RANGE_LOCK = 31; |
53 | 53 |
54 private static final String[][] messages = { | 54 private static final String[][] messages = { |
55 | 55 |
56 {"SSH_FX_OK", "Indicates successful completion of the operation."}, | 56 {"SSH_FX_OK", "Indicates successful completion of the operation."}, |
57 {"SSH_FX_EOF", | 57 { |
58 "An attempt to read past the end-of-file was made; or, there are no more directory entries to return."}, | 58 "SSH_FX_EOF", |
59 {"SSH_FX_NO_SUCH_FILE", "A reference was made to a file which does not exist."}, | 59 "An attempt to read past the end-of-file was made; or, there are no more directory entries to return." |
60 {"SSH_FX_PERMISSION_DENIED", "The user does not have sufficient permissions to perform the operation."}, | 60 }, |
61 {"SSH_FX_FAILURE", "An error occurred, but no specific error code exists to describe the failure."}, | 61 {"SSH_FX_NO_SUCH_FILE", "A reference was made to a file which does not exist."}, |
62 {"SSH_FX_BAD_MESSAGE", "A badly formatted packet or other SFTP protocol incompatibility was detected."}, | 62 {"SSH_FX_PERMISSION_DENIED", "The user does not have sufficient permissions to perform the operation."}, |
63 {"SSH_FX_NO_CONNECTION", "There is no connection to the server."}, | 63 {"SSH_FX_FAILURE", "An error occurred, but no specific error code exists to describe the failure."}, |
64 {"SSH_FX_CONNECTION_LOST", "The connection to the server was lost."}, | 64 {"SSH_FX_BAD_MESSAGE", "A badly formatted packet or other SFTP protocol incompatibility was detected."}, |
65 {"SSH_FX_OP_UNSUPPORTED", | 65 {"SSH_FX_NO_CONNECTION", "There is no connection to the server."}, |
66 "An attempted operation could not be completed by the server because the server does not support the operation."}, | 66 {"SSH_FX_CONNECTION_LOST", "The connection to the server was lost."}, |
67 {"SSH_FX_INVALID_HANDLE", "The handle value was invalid."}, | 67 { |
68 {"SSH_FX_NO_SUCH_PATH", "The file path does not exist or is invalid."}, | 68 "SSH_FX_OP_UNSUPPORTED", |
69 {"SSH_FX_FILE_ALREADY_EXISTS", "The file already exists."}, | 69 "An attempted operation could not be completed by the server because the server does not support the operation." |
70 {"SSH_FX_WRITE_PROTECT", "The file is on read-only media, or the media is write protected."}, | 70 }, |
71 {"SSH_FX_NO_MEDIA", | 71 {"SSH_FX_INVALID_HANDLE", "The handle value was invalid."}, |
72 "The requested operation cannot be completed because there is no media available in the drive."}, | 72 {"SSH_FX_NO_SUCH_PATH", "The file path does not exist or is invalid."}, |
73 {"SSH_FX_NO_SPACE_ON_FILESYSTEM", | 73 {"SSH_FX_FILE_ALREADY_EXISTS", "The file already exists."}, |
74 "The requested operation cannot be completed because there is insufficient free space on the filesystem."}, | 74 {"SSH_FX_WRITE_PROTECT", "The file is on read-only media, or the media is write protected."}, |
75 {"SSH_FX_QUOTA_EXCEEDED", | 75 { |
76 "The operation cannot be completed because it would exceed the user's storage quota."}, | 76 "SSH_FX_NO_MEDIA", |
77 { | 77 "The requested operation cannot be completed because there is no media available in the drive." |
78 "SSH_FX_UNKNOWN_PRINCIPAL", | 78 }, |
79 "A principal referenced by the request (either the 'owner', 'group', or 'who' field of an ACL), was unknown. The error specific data contains the problematic names."}, | 79 { |
80 {"SSH_FX_LOCK_CONFLICT", "The file could not be opened because it is locked by another process."}, | 80 "SSH_FX_NO_SPACE_ON_FILESYSTEM", |
81 {"SSH_FX_DIR_NOT_EMPTY", "The directory is not empty."}, | 81 "The requested operation cannot be completed because there is insufficient free space on the filesystem." |
82 {"SSH_FX_NOT_A_DIRECTORY", "The specified file is not a directory."}, | 82 }, |
83 {"SSH_FX_INVALID_FILENAME", "The filename is not valid."}, | 83 { |
84 {"SSH_FX_LINK_LOOP", | 84 "SSH_FX_QUOTA_EXCEEDED", |
85 "Too many symbolic links encountered or, an SSH_FXF_NOFOLLOW open encountered a symbolic link as the final component."}, | 85 "The operation cannot be completed because it would exceed the user's storage quota." |
86 {"SSH_FX_CANNOT_DELETE", | 86 }, |
87 "The file cannot be deleted. One possible reason is that the advisory READONLY attribute-bit is set."}, | 87 { |
88 {"SSH_FX_INVALID_PARAMETER", | 88 "SSH_FX_UNKNOWN_PRINCIPAL", |
89 "One of the parameters was out of range, or the parameters specified cannot be used together."}, | 89 "A principal referenced by the request (either the 'owner', 'group', or 'who' field of an ACL), was unknown. The error specific data contains the problematic names." |
90 {"SSH_FX_FILE_IS_A_DIRECTORY", | 90 }, |
91 "The specified file was a directory in a context where a directory cannot be used."}, | 91 {"SSH_FX_LOCK_CONFLICT", "The file could not be opened because it is locked by another process."}, |
92 {"SSH_FX_BYTE_RANGE_LOCK_CONFLICT", | 92 {"SSH_FX_DIR_NOT_EMPTY", "The directory is not empty."}, |
93 " A read or write operation failed because another process's mandatory byte-range lock overlaps with the request."}, | 93 {"SSH_FX_NOT_A_DIRECTORY", "The specified file is not a directory."}, |
94 {"SSH_FX_BYTE_RANGE_LOCK_REFUSED", "A request for a byte range lock was refused."}, | 94 {"SSH_FX_INVALID_FILENAME", "The filename is not valid."}, |
95 {"SSH_FX_DELETE_PENDING", "An operation was attempted on a file for which a delete operation is pending."}, | 95 { |
96 {"SSH_FX_FILE_CORRUPT", "The file is corrupt; an filesystem integrity check should be run."}, | 96 "SSH_FX_LINK_LOOP", |
97 {"SSH_FX_OWNER_INVALID", "The principal specified can not be assigned as an owner of a file."}, | 97 "Too many symbolic links encountered or, an SSH_FXF_NOFOLLOW open encountered a symbolic link as the final component." |
98 {"SSH_FX_GROUP_INVALID", "The principal specified can not be assigned as the primary group of a file."}, | 98 }, |
99 {"SSH_FX_NO_MATCHING_BYTE_RANGE_LOCK", | 99 { |
100 "The requested operation could not be completed because the specifed byte range lock has not been granted."}, | 100 "SSH_FX_CANNOT_DELETE", |
101 "The file cannot be deleted. One possible reason is that the advisory READONLY attribute-bit is set." | |
102 }, | |
103 { | |
104 "SSH_FX_INVALID_PARAMETER", | |
105 "One of the parameters was out of range, or the parameters specified cannot be used together." | |
106 }, | |
107 { | |
108 "SSH_FX_FILE_IS_A_DIRECTORY", | |
109 "The specified file was a directory in a context where a directory cannot be used." | |
110 }, | |
111 { | |
112 "SSH_FX_BYTE_RANGE_LOCK_CONFLICT", | |
113 " A read or write operation failed because another process's mandatory byte-range lock overlaps with the request." | |
114 }, | |
115 {"SSH_FX_BYTE_RANGE_LOCK_REFUSED", "A request for a byte range lock was refused."}, | |
116 {"SSH_FX_DELETE_PENDING", "An operation was attempted on a file for which a delete operation is pending."}, | |
117 {"SSH_FX_FILE_CORRUPT", "The file is corrupt; an filesystem integrity check should be run."}, | |
118 {"SSH_FX_OWNER_INVALID", "The principal specified can not be assigned as an owner of a file."}, | |
119 {"SSH_FX_GROUP_INVALID", "The principal specified can not be assigned as the primary group of a file."}, | |
120 { | |
121 "SSH_FX_NO_MATCHING_BYTE_RANGE_LOCK", | |
122 "The requested operation could not be completed because the specifed byte range lock has not been granted." | |
123 }, | |
101 | 124 |
102 }; | 125 }; |
103 | 126 |
104 public static final String[] getDescription(int errorCode) { | 127 public static final String[] getDescription(int errorCode) { |
105 if((errorCode < 0) || (errorCode >= messages.length)) { | 128 if ((errorCode < 0) || (errorCode >= messages.length)) { |
106 return null; | 129 return null; |
107 } | 130 } |
108 | 131 |
109 return messages[errorCode]; | 132 return messages[errorCode]; |
110 } | 133 } |