01: package ch.ethz.ssh2;
02:
03: /**
04: * A <code>SFTPv3FileHandle</code>.
05: *
06: * @author Christian Plattner, plattner@inf.ethz.ch
07: * @version $Id: SFTPv3FileHandle.java,v 1.2 2006/09/11 09:05:11 cplattne Exp $
08: */
09:
10: public class SFTPv3FileHandle {
11: final SFTPv3Client client;
12: final byte[] fileHandle;
13: boolean isClosed = false;
14:
15: /* The constructor is NOT public */
16:
17: SFTPv3FileHandle(SFTPv3Client client, byte[] h) {
18: this .client = client;
19: this .fileHandle = h;
20: }
21:
22: /**
23: * Get the SFTPv3Client instance which created this handle.
24: *
25: * @return A SFTPv3Client instance.
26: */
27: public SFTPv3Client getClient() {
28: return client;
29: }
30:
31: /**
32: * Check if this handle was closed with the {@link SFTPv3Client#closeFile(SFTPv3FileHandle)} method
33: * of the <code>SFTPv3Client</code> instance which created the handle.
34: *
35: * @return if the handle is closed.
36: */
37: public boolean isClosed() {
38: return isClosed;
39: }
40: }
|