Mercurial > 510Connectbot
comparison src/ch/ethz/ssh2/SFTPv3Client.java @ 305:d2b303406d63 ganymed
remove extra override annotations that generate eclipse compiler errors
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Wed, 30 Jul 2014 12:09:51 -0700 |
parents | 91a31873c42a |
children | 071eccdff8ea |
comparison
equal
deleted
inserted
replaced
304:abad243cb341 | 305:d2b303406d63 |
---|---|
117 public SFTPv3Client(Connection conn, PacketListener listener) throws IOException { | 117 public SFTPv3Client(Connection conn, PacketListener listener) throws IOException { |
118 super(conn, 3, listener); | 118 super(conn, 3, listener); |
119 this.listener = listener; | 119 this.listener = listener; |
120 } | 120 } |
121 | 121 |
122 @Override | |
123 public SFTPv3FileAttributes fstat(SFTPFileHandle handle) throws IOException { | 122 public SFTPv3FileAttributes fstat(SFTPFileHandle handle) throws IOException { |
124 int req_id = generateNextRequestID(); | 123 int req_id = generateNextRequestID(); |
125 | 124 |
126 TypesWriter tw = new TypesWriter(); | 125 TypesWriter tw = new TypesWriter(); |
127 tw.writeString(handle.getHandle(), 0, handle.getHandle().length); | 126 tw.writeString(handle.getHandle(), 0, handle.getHandle().length); |
186 String errorMessage = tr.readString(); | 185 String errorMessage = tr.readString(); |
187 listener.read(errorMessage); | 186 listener.read(errorMessage); |
188 throw new SFTPException(errorMessage, errorCode); | 187 throw new SFTPException(errorMessage, errorCode); |
189 } | 188 } |
190 | 189 |
191 @Override | |
192 public SFTPv3FileAttributes stat(String path) throws IOException { | 190 public SFTPv3FileAttributes stat(String path) throws IOException { |
193 return statBoth(path, Packet.SSH_FXP_STAT); | 191 return statBoth(path, Packet.SSH_FXP_STAT); |
194 } | 192 } |
195 | 193 |
196 @Override | |
197 public SFTPv3FileAttributes lstat(String path) throws IOException { | 194 public SFTPv3FileAttributes lstat(String path) throws IOException { |
198 return statBoth(path, Packet.SSH_FXP_LSTAT); | 195 return statBoth(path, Packet.SSH_FXP_LSTAT); |
199 } | 196 } |
200 | 197 |
201 | 198 |
255 listener.read(errorMessage); | 252 listener.read(errorMessage); |
256 throw new SFTPException(errorMessage, errorCode); | 253 throw new SFTPException(errorMessage, errorCode); |
257 } | 254 } |
258 } | 255 } |
259 | 256 |
260 @Override | |
261 public final SFTPv3FileHandle openDirectory(String path) throws IOException { | 257 public final SFTPv3FileHandle openDirectory(String path) throws IOException { |
262 int req_id = generateNextRequestID(); | 258 int req_id = generateNextRequestID(); |
263 | 259 |
264 TypesWriter tw = new TypesWriter(); | 260 TypesWriter tw = new TypesWriter(); |
265 tw.writeString(path, this.getCharset()); | 261 tw.writeString(path, this.getCharset()); |
297 * | 293 * |
298 * @param dirName See the {@link SFTPv3Client comment} for the class for more details. | 294 * @param dirName See the {@link SFTPv3Client comment} for the class for more details. |
299 * @return A Vector containing {@link SFTPv3DirectoryEntry} objects. | 295 * @return A Vector containing {@link SFTPv3DirectoryEntry} objects. |
300 * @throws IOException | 296 * @throws IOException |
301 */ | 297 */ |
302 @Override | |
303 public List<SFTPv3DirectoryEntry> ls(String dirName) throws IOException { | 298 public List<SFTPv3DirectoryEntry> ls(String dirName) throws IOException { |
304 SFTPv3FileHandle handle = openDirectory(dirName); | 299 SFTPv3FileHandle handle = openDirectory(dirName); |
305 List<SFTPv3DirectoryEntry> result = scanDirectory(handle.getHandle()); | 300 List<SFTPv3DirectoryEntry> result = scanDirectory(handle.getHandle()); |
306 closeFile(handle); | 301 closeFile(handle); |
307 return result; | 302 return result; |
363 */ | 358 */ |
364 public SFTPv3FileHandle openFileWAppend(String filename) throws IOException { | 359 public SFTPv3FileHandle openFileWAppend(String filename) throws IOException { |
365 return openFile(filename, SSH_FXF_WRITE | SSH_FXF_APPEND, new SFTPv3FileAttributes()); | 360 return openFile(filename, SSH_FXF_WRITE | SSH_FXF_APPEND, new SFTPv3FileAttributes()); |
366 } | 361 } |
367 | 362 |
368 @Override | |
369 public SFTPv3FileHandle createFile(String filename) throws IOException { | 363 public SFTPv3FileHandle createFile(String filename) throws IOException { |
370 return createFile(filename, new SFTPv3FileAttributes()); | 364 return createFile(filename, new SFTPv3FileAttributes()); |
371 } | 365 } |
372 | 366 |
373 @Override | |
374 public SFTPv3FileHandle createFile(String filename, SFTPFileAttributes attr) throws IOException { | 367 public SFTPv3FileHandle createFile(String filename, SFTPFileAttributes attr) throws IOException { |
375 return openFile(filename, SSH_FXF_CREAT | SSH_FXF_READ | SSH_FXF_WRITE, attr); | 368 return openFile(filename, SSH_FXF_CREAT | SSH_FXF_READ | SSH_FXF_WRITE, attr); |
376 } | 369 } |
377 | 370 |
378 /** | 371 /** |
403 */ | 396 */ |
404 public SFTPv3FileHandle createFileTruncate(String filename, SFTPFileAttributes attr) throws IOException { | 397 public SFTPv3FileHandle createFileTruncate(String filename, SFTPFileAttributes attr) throws IOException { |
405 return openFile(filename, SSH_FXF_CREAT | SSH_FXF_TRUNC | SSH_FXF_WRITE, attr); | 398 return openFile(filename, SSH_FXF_CREAT | SSH_FXF_TRUNC | SSH_FXF_WRITE, attr); |
406 } | 399 } |
407 | 400 |
408 @Override | |
409 public SFTPv3FileHandle openFile(String filename, int flags) throws IOException { | 401 public SFTPv3FileHandle openFile(String filename, int flags) throws IOException { |
410 return openFile(filename, flags, new SFTPv3FileAttributes()); | 402 return openFile(filename, flags, new SFTPv3FileAttributes()); |
411 } | 403 } |
412 | 404 |
413 @Override | 405 @Override |