KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > ch > ethz > ssh2 > SFTPv3FileHandle


1
2 package ch.ethz.ssh2;
3
4 /**
5  * A <code>SFTPv3FileHandle</code>.
6  *
7  * @author Christian Plattner, plattner@inf.ethz.ch
8  * @version $Id: SFTPv3FileHandle.java,v 1.2 2006/09/11 09:05:11 cplattne Exp $
9  */

10
11 public class SFTPv3FileHandle
12 {
13     final SFTPv3Client client;
14     final byte[] fileHandle;
15     boolean isClosed = false;
16
17     /* The constructor is NOT public */
18
19     SFTPv3FileHandle(SFTPv3Client client, byte[] h)
20     {
21         this.client = client;
22         this.fileHandle = h;
23     }
24
25     /**
26      * Get the SFTPv3Client instance which created this handle.
27      *
28      * @return A SFTPv3Client instance.
29      */

30     public SFTPv3Client getClient()
31     {
32         return client;
33     }
34
35     /**
36      * Check if this handle was closed with the {@link SFTPv3Client#closeFile(SFTPv3FileHandle)} method
37      * of the <code>SFTPv3Client</code> instance which created the handle.
38      *
39      * @return if the handle is closed.
40      */

41     public boolean isClosed()
42     {
43         return isClosed;
44     }
45 }
46
Popular Tags