1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
5 <!-- Generated by javadoc on Mon Jun 09 15:53:37 PDT 2003 -->
9 <META NAME="keywords" CONTENT="org.openafs.jafs.Key,Key class">
10 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
15 parent.document.title="Key (Java AFS API)";
18 <BODY BGCOLOR="white" onload="asd();">
20 <!-- ========== START OF NAVBAR ========== -->
21 <A NAME="navbar_top"><!-- --></A>
22 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
24 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
25 <A NAME="navbar_top_firstrow"><!-- --></A>
26 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
27 <TR ALIGN="center" VALIGN="top">
28 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
29 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
30 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Key.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
31 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
32 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
33 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
34 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
38 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
39 <B>JAFS API v2</B></EM>
44 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
45 <A HREF="../../../org/openafs/jafs/Group.html"><B>PREV CLASS</B></A>
46 <A HREF="../../../org/openafs/jafs/Partition.html"><B>NEXT CLASS</B></A></FONT></TD>
47 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
48 <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
49 <A HREF="Key.html" TARGET="_top"><B>NO FRAMES</B></A>
54 document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
59 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
64 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
65 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
66 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
67 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
70 <!-- =========== END OF NAVBAR =========== -->
73 <!-- ======== START OF CLASS DATA ======== -->
76 org.openafs.jafs</FONT>
80 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">java.lang.Object</A>
82 +--<B>org.openafs.jafs.Key</B>
85 <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html">Serializable</A></DD>
89 <DT>public class <B>Key</B><DT>extends <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A><DT>implements <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/Serializable.html">Serializable</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</A></DL>
92 An abstract representation of an AFS key. It holds information about
93 the key, such as what its version is.
96 Constructing an instance of a <code>Key</code> does not mean an actual
97 AFS key is created on a server -- usually a <code>Key</code>
98 object is a representation of an already existing AFS key. If,
99 however, the <code>Key</code> is constructed with the version number of a
100 key that does not exist on the server represented by the provided
101 <code>Server</code>, a new key with that version number can be
102 created on that server by calling the <A HREF="../../../org/openafs/jafs/Key.html#create(java.lang.String)"><CODE>create(String)</CODE></A> methods If
103 such a key does already exist when this method is called,
104 an exception will be thrown.<BR><BR>
106 <!--Example of how to use class-->
107 The following is a simple example of how to construct and use a
108 <code>Key</code> object. It obtains the list of <code>Key</code>s from
109 a specified server, and prints the string representation of each key.
111 import org.openafs.jafs.Cell;
112 import org.openafs.jafs.AFSException;
113 import org.openafs.jafs.Key;
114 import org.openafs.jafs.Server;
120 private Server server;
122 public static void main(String[] args) throws Exception
124 String username = arg[0];
125 String password = arg[1];
126 String cellName = arg[2];
127 String serverName = arg[3];
129 token = new Token(username, password, cellName);
130 cell = new Cell(token);
131 server = new Server(serverName, cell);
133 System.out.println("Keys in Server " + server.getName() + ":");
134 Key[] keys = server.getKeys();
135 for (int i = 0; i < keys.length; i++) {
136 System.out.println(" -> " + keys[i] );
146 <DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.openafs.jafs.Key">Serialized Form</A></DL>
150 <!-- ======== NESTED CLASS SUMMARY ======== -->
153 <!-- =========== FIELD SUMMARY =========== -->
155 <A NAME="field_summary"><!-- --></A>
156 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
157 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
158 <TD COLSPAN=2><FONT SIZE="+2">
159 <B>Field Summary</B></FONT></TD>
161 <TR BGCOLOR="white" CLASS="TableRowColor">
162 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163 <CODE>protected boolean</CODE></FONT></TD>
164 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#cachedInfo">cachedInfo</A></B></CODE>
167 </TD>
169 <TR BGCOLOR="white" CLASS="TableRowColor">
170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171 <CODE>protected long</CODE></FONT></TD>
172 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#checkSum">checkSum</A></B></CODE>
175 </TD>
177 <TR BGCOLOR="white" CLASS="TableRowColor">
178 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179 <CODE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
180 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#encryptionKey">encryptionKey</A></B></CODE>
183 </TD>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187 <CODE>protected int</CODE></FONT></TD>
188 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#lastModDate">lastModDate</A></B></CODE>
191 </TD>
193 <TR BGCOLOR="white" CLASS="TableRowColor">
194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195 <CODE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A></CODE></FONT></TD>
196 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#lastModDateDate">lastModDateDate</A></B></CODE>
199 </TD>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>protected int</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#lastModMs">lastModMs</A></B></CODE>
207 </TD>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE>protected <A HREF="../../../org/openafs/jafs/Server.html">Server</A></CODE></FONT></TD>
212 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#server">server</A></B></CODE>
215 </TD>
217 <TR BGCOLOR="white" CLASS="TableRowColor">
218 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219 <CODE>protected int</CODE></FONT></TD>
220 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#version">version</A></B></CODE>
223 </TD>
227 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
229 <A NAME="constructor_summary"><!-- --></A>
230 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
231 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
232 <TD COLSPAN=2><FONT SIZE="+2">
233 <B>Constructor Summary</B></FONT></TD>
235 <TR BGCOLOR="white" CLASS="TableRowColor">
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237 <CODE> </CODE></FONT></TD>
238 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#Key(int, org.openafs.jafs.Server)">Key</A></B>(int version,
239 <A HREF="../../../org/openafs/jafs/Server.html">Server</A> server)</CODE>
242 Constructs a new <CODE>Key</CODE> object instance given the version of
243 the AFS key and the AFS server, represented by <CODE>server</CODE>,
244 to which it belongs. </TD>
246 <TR BGCOLOR="white" CLASS="TableRowColor">
247 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248 <CODE> </CODE></FONT></TD>
249 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#Key(int, org.openafs.jafs.Server, boolean)">Key</A></B>(int version,
250 <A HREF="../../../org/openafs/jafs/Server.html">Server</A> server,
251 boolean preloadAllMembers)</CODE>
254 Constructs a new <CODE>Key</CODE> object instance given the version of
255 the AFS key and the AFS server, represented by <CODE>server</CODE>,
256 to which it belongs. </TD>
258 <TR BGCOLOR="white" CLASS="TableRowColor">
259 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
260 <CODE>(package private)</CODE></FONT></TD>
261 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#Key(org.openafs.jafs.Server)">Key</A></B>(<A HREF="../../../org/openafs/jafs/Server.html">Server</A> server)</CODE>
264 Creates a blank <code>Key</code> given the server to which the key
269 <!-- ========== METHOD SUMMARY =========== -->
271 <A NAME="method_summary"><!-- --></A>
272 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
273 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
274 <TD COLSPAN=2><FONT SIZE="+2">
275 <B>Method Summary</B></FONT></TD>
277 <TR BGCOLOR="white" CLASS="TableRowColor">
278 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
279 <CODE> int</CODE></FONT></TD>
280 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#compareTo(org.openafs.jafs.Key)">compareTo</A></B>(<A HREF="../../../org/openafs/jafs/Key.html">Key</A> key)</CODE>
283 Compares two Key objects respective to their key version and does not
284 factor any other attribute.</TD>
286 <TR BGCOLOR="white" CLASS="TableRowColor">
287 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
288 <CODE> int</CODE></FONT></TD>
289 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#compareTo(java.lang.Object)">compareTo</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A> obj)</CODE>
292 Comparable interface method.</TD>
294 <TR BGCOLOR="white" CLASS="TableRowColor">
295 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
296 <CODE>protected static void</CODE></FONT></TD>
297 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#create(int, int, int, java.lang.String)">create</A></B>(int cellHandle,
298 int serverHandle,
299 int versionNumber,
300 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> keyString)</CODE>
303 Create a server key.</TD>
305 <TR BGCOLOR="white" CLASS="TableRowColor">
306 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
307 <CODE> void</CODE></FONT></TD>
308 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#create(java.lang.String)">create</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> keyString)</CODE>
311 Creates a key with this <code>Key's</code> version number at the server,
312 using the specified <code>String</code> for the key.</TD>
314 <TR BGCOLOR="white" CLASS="TableRowColor">
315 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
316 <CODE> void</CODE></FONT></TD>
317 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#delete()">delete</A></B>()</CODE>
320 Removes the key with this <code>Key's</code> version number from
323 <TR BGCOLOR="white" CLASS="TableRowColor">
324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325 <CODE>protected static void</CODE></FONT></TD>
326 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#delete(int, int)">delete</A></B>(int serverHandle,
327 int versionNumber)</CODE>
330 Delete a server key.</TD>
332 <TR BGCOLOR="white" CLASS="TableRowColor">
333 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
334 <CODE> boolean</CODE></FONT></TD>
335 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#equals(org.openafs.jafs.Key)">equals</A></B>(<A HREF="../../../org/openafs/jafs/Key.html">Key</A> otherKey)</CODE>
338 Tests whether two <code>Key</code> objects are equal, based on their
339 encryption key, version, and associated Server.</TD>
341 <TR BGCOLOR="white" CLASS="TableRowColor">
342 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
343 <CODE> long</CODE></FONT></TD>
344 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getCheckSum()">getCheckSum</A></B>()</CODE>
347 Returns the check sum of this key.</TD>
349 <TR BGCOLOR="white" CLASS="TableRowColor">
350 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
351 <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
352 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getEncryptionKey()">getEncryptionKey</A></B>()</CODE>
355 Returns the encrypted key as a string in octal form. </TD>
357 <TR BGCOLOR="white" CLASS="TableRowColor">
358 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
359 <CODE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
360 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getInfo()">getInfo</A></B>()</CODE>
363 Returns a <code>String</code> representation of this <code>Key</code>.
366 <TR BGCOLOR="white" CLASS="TableRowColor">
367 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
368 <CODE>protected static void</CODE></FONT></TD>
369 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getKeyInfo(int, int, org.openafs.jafs.Key)">getKeyInfo</A></B>(int serverHandle,
371 <A HREF="../../../org/openafs/jafs/Key.html">Key</A> key)</CODE>
374 Fills in the information fields of the provided <code>Key</code>.</TD>
376 <TR BGCOLOR="white" CLASS="TableRowColor">
377 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
378 <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A></CODE></FONT></TD>
379 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getLastModDate()">getLastModDate</A></B>()</CODE>
382 Returns the last modification date of this key.</TD>
384 <TR BGCOLOR="white" CLASS="TableRowColor">
385 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
386 <CODE> <A HREF="../../../org/openafs/jafs/Server.html">Server</A></CODE></FONT></TD>
387 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getServer()">getServer</A></B>()</CODE>
390 Returns the server this key is associated with.</TD>
392 <TR BGCOLOR="white" CLASS="TableRowColor">
393 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
394 <CODE> int</CODE></FONT></TD>
395 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getVersion()">getVersion</A></B>()</CODE>
398 Returns the version of this key in primitive form.</TD>
400 <TR BGCOLOR="white" CLASS="TableRowColor">
401 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
402 <CODE>protected static void</CODE></FONT></TD>
403 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#reclaimKeyMemory()">reclaimKeyMemory</A></B>()</CODE>
406 Reclaims all memory being saved by the key portion of the native library.
409 <TR BGCOLOR="white" CLASS="TableRowColor">
410 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
411 <CODE> void</CODE></FONT></TD>
412 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#refresh()">refresh</A></B>()</CODE>
415 Refreshes the properties of this Key object instance with values from
416 the AFS key it represents. </TD>
418 <TR BGCOLOR="white" CLASS="TableRowColor">
419 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
420 <CODE>protected void</CODE></FONT></TD>
421 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#refresh(boolean)">refresh</A></B>(boolean all)</CODE>
424 Refreshes the properties of this Key object instance with values from
425 the AFS key it represents. </TD>
427 <TR BGCOLOR="white" CLASS="TableRowColor">
428 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
429 <CODE>protected void</CODE></FONT></TD>
430 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#refreshInfo()">refreshInfo</A></B>()</CODE>
433 Refreshes the information fields of this <code>Key</code> to reflect the
434 current state of the AFS server key. </TD>
436 <TR BGCOLOR="white" CLASS="TableRowColor">
437 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
438 <CODE> <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A></CODE></FONT></TD>
439 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#toString()">toString</A></B>()</CODE>
442 Returns the name of this <CODE>Key</CODE></TD>
445 <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
446 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
447 <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
448 <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A></B></TD>
450 <TR BGCOLOR="white" CLASS="TableRowColor">
451 <TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD>
457 <!-- ============ FIELD DETAIL =========== -->
459 <A NAME="field_detail"><!-- --></A>
460 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
461 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
462 <TD COLSPAN=1><FONT SIZE="+2">
463 <B>Field Detail</B></FONT></TD>
467 <A NAME="server"><!-- --></A><H3>
470 protected <A HREF="../../../org/openafs/jafs/Server.html">Server</A> <B>server</B></PRE>
477 <A NAME="version"><!-- --></A><H3>
480 protected int <B>version</B></PRE>
487 <A NAME="checkSum"><!-- --></A><H3>
490 protected long <B>checkSum</B></PRE>
497 <A NAME="encryptionKey"><!-- --></A><H3>
500 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>encryptionKey</B></PRE>
507 <A NAME="lastModDate"><!-- --></A><H3>
510 protected int <B>lastModDate</B></PRE>
517 <A NAME="lastModMs"><!-- --></A><H3>
520 protected int <B>lastModMs</B></PRE>
527 <A NAME="lastModDateDate"><!-- --></A><H3>
530 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A> <B>lastModDateDate</B></PRE>
537 <A NAME="cachedInfo"><!-- --></A><H3>
540 protected boolean <B>cachedInfo</B></PRE>
546 <!-- ========= CONSTRUCTOR DETAIL ======== -->
548 <A NAME="constructor_detail"><!-- --></A>
549 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
550 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
551 <TD COLSPAN=1><FONT SIZE="+2">
552 <B>Constructor Detail</B></FONT></TD>
556 <A NAME="Key(int, org.openafs.jafs.Server)"><!-- --></A><H3>
559 public <B>Key</B>(int version,
560 <A HREF="../../../org/openafs/jafs/Server.html">Server</A> server)
561 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
563 <DD>Constructs a new <CODE>Key</CODE> object instance given the version of
564 the AFS key and the AFS server, represented by <CODE>server</CODE>,
565 to which it belongs. This does not actually
566 create a new AFS key, it just represents one.
567 If <code>version</code> is not an actual AFS key, exceptions
568 will be thrown during subsequent method invocations on this
569 object, unless the <A HREF="../../../org/openafs/jafs/Key.html#create(java.lang.String)"><CODE>create(String)</CODE></A>
570 method is explicitly called to create it.
572 <DT><B>Parameters:</B><DD><CODE>version</CODE> - the version of the key to represent<DD><CODE>server</CODE> - the server to which the key belongs.
574 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
577 <A NAME="Key(int, org.openafs.jafs.Server, boolean)"><!-- --></A><H3>
580 public <B>Key</B>(int version,
581 <A HREF="../../../org/openafs/jafs/Server.html">Server</A> server,
582 boolean preloadAllMembers)
583 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
585 <DD>Constructs a new <CODE>Key</CODE> object instance given the version of
586 the AFS key and the AFS server, represented by <CODE>server</CODE>,
587 to which it belongs. This does not actually
588 create a new AFS key, it just represents one.
589 If <code>version</code> is not an actual AFS key, exceptions
590 will be thrown during subsequent method invocations on this
591 object, unless the <A HREF="../../../org/openafs/jafs/Key.html#create(java.lang.String)"><CODE>create(String)</CODE></A>
592 method is explicitly called to create it. Note that if the key does not
593 exist and <code>preloadAllMembers</code> is true, an exception will
596 <P> This constructor is ideal for point-in-time representation and
597 transient applications. It ensures all data member values are set and
598 available without calling back to the filesystem at the first request
599 for them. Use the <A HREF="../../../org/openafs/jafs/Key.html#refresh()"><CODE>refresh()</CODE></A> method to address any coherency
602 <DT><B>Parameters:</B><DD><CODE>version</CODE> - the version of the key to represent<DD><CODE>server</CODE> - the server to which the key belongs.<DD><CODE>preloadAllMembers</CODE> - true will ensure all object members are set
603 upon construction; otherwise members will be
604 set upon access, which is the default behavior.
606 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code<DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Key.html#refresh()"><CODE>refresh()</CODE></A></DL>
609 <A NAME="Key(org.openafs.jafs.Server)"><!-- --></A><H3>
612 <B>Key</B>(<A HREF="../../../org/openafs/jafs/Server.html">Server</A> server)
613 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
615 <DD>Creates a blank <code>Key</code> given the server to which the key
616 belongs. This blank object can then be passed into other methods to
617 fill out its properties.
619 <DT><B>Parameters:</B><DD><CODE>server</CODE> - the server to which the key belongs.
621 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
623 <!-- ============ METHOD DETAIL ========== -->
625 <A NAME="method_detail"><!-- --></A>
626 <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
627 <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
628 <TD COLSPAN=1><FONT SIZE="+2">
629 <B>Method Detail</B></FONT></TD>
633 <A NAME="refresh()"><!-- --></A><H3>
636 public void <B>refresh</B>()
637 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
639 <DD>Refreshes the properties of this Key object instance with values from
640 the AFS key it represents. All properties that have been initialized
641 and/or accessed will be renewed according to the values of the AFS key
642 this Key object instance represents.
644 <P>Since in most environments administrative changes can be administered
645 from an AFS command-line program or an alternate GUI application, this
646 method provides a means to refresh the Java object representation and
647 thereby ascertain any possible modifications that may have been made
648 from such alternate administrative programs. Using this method before
649 an associated instance accessor will ensure the highest level of
650 representative accuracy, accommodating changes made external to the
651 Java application space. If administrative changes to the underlying AFS
652 system are only allowed via this API, then the use of this method is
661 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
666 <A NAME="refresh(boolean)"><!-- --></A><H3>
669 protected void <B>refresh</B>(boolean all)
670 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
672 <DD>Refreshes the properties of this Key object instance with values from
673 the AFS key it represents. If <CODE>all</CODE> is <CODE>true</CODE>
674 then <U>all</U> of the properties of this Key object instance will be
675 set, or renewed, according to the values of the AFS key it represents,
676 disregarding any previously set properties.
678 <P> Thus, if <CODE>all</CODE> is <CODE>false</CODE> then properties that
679 are currently set will be refreshed and properties that are not set will
680 remain uninitialized. See <A HREF="../../../org/openafs/jafs/Key.html#refresh()"><CODE>refresh()</CODE></A> for more information.
686 <DT><B>Parameters:</B><DD><CODE>all</CODE> - if true set or renew all object properties; otherwise renew
689 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code<DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Key.html#refresh()"><CODE>refresh()</CODE></A></DL>
694 <A NAME="refreshInfo()"><!-- --></A><H3>
697 protected void <B>refreshInfo</B>()
698 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
700 <DD>Refreshes the information fields of this <code>Key</code> to reflect the
701 current state of the AFS server key. These inlclude the last
702 modification time, etc.
710 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
715 <A NAME="create(java.lang.String)"><!-- --></A><H3>
718 public void <B>create</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> keyString)
719 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
721 <DD>Creates a key with this <code>Key's</code> version number at the server,
722 using the specified <code>String</code> for the key.
728 <DT><B>Parameters:</B><DD><CODE>keyString</CODE> - the string to use for the encryption key
730 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
735 <A NAME="delete()"><!-- --></A><H3>
738 public void <B>delete</B>()
739 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
741 <DD>Removes the key with this <code>Key's</code> version number from
750 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
755 <A NAME="getVersion()"><!-- --></A><H3>
758 public int <B>getVersion</B>()</PRE>
760 <DD>Returns the version of this key in primitive form.
767 <DT><B>Returns:</B><DD>the version number of this key</DL>
772 <A NAME="getServer()"><!-- --></A><H3>
775 public <A HREF="../../../org/openafs/jafs/Server.html">Server</A> <B>getServer</B>()</PRE>
777 <DD>Returns the server this key is associated with.
784 <DT><B>Returns:</B><DD>this key's server</DL>
789 <A NAME="getEncryptionKey()"><!-- --></A><H3>
790 getEncryptionKey</H3>
792 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getEncryptionKey</B>()
793 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
795 <DD>Returns the encrypted key as a string in octal form. This is how AFS
796 prints it out on the command line. An example would be:
797 '\040\205\211\241\345\002\023\211'.
804 <DT><B>Returns:</B><DD>the encrypted key
806 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
811 <A NAME="getCheckSum()"><!-- --></A><H3>
814 public long <B>getCheckSum</B>()
815 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
817 <DD>Returns the check sum of this key.
824 <DT><B>Returns:</B><DD>the check sum of this key
826 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
831 <A NAME="getLastModDate()"><!-- --></A><H3>
834 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A> <B>getLastModDate</B>()
835 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
837 <DD>Returns the last modification date of this key.
844 <DT><B>Returns:</B><DD>the last modification date of this key
846 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
851 <A NAME="getInfo()"><!-- --></A><H3>
854 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getInfo</B>()</PRE>
856 <DD>Returns a <code>String</code> representation of this <code>Key</code>.
857 Contains the information fields.
864 <DT><B>Returns:</B><DD>a <code>String</code> representation of the <code>Key</code></DL>
869 <A NAME="compareTo(org.openafs.jafs.Key)"><!-- --></A><H3>
872 public int <B>compareTo</B>(<A HREF="../../../org/openafs/jafs/Key.html">Key</A> key)</PRE>
874 <DD>Compares two Key objects respective to their key version and does not
875 factor any other attribute.
881 <DT><B>Parameters:</B><DD><CODE>key</CODE> - The Key object to be compared to this Key instance
882 <DT><B>Returns:</B><DD>Zero if the argument is equal to this Key's version, a
883 value less than zero if this Key's version is less than
884 the argument, or a value greater than zero if this Key's
885 version is greater than the argument</DL>
890 <A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
893 public int <B>compareTo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A> obj)</PRE>
895 <DD>Comparable interface method.
898 <DT><B>Specified by:</B><DD><CODE>compareTo</CODE> in interface <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Comparable.html">Comparable</A></CODE></DL>
901 <DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Key.html#compareTo(org.openafs.jafs.Key)"><CODE>compareTo(Key)</CODE></A></DL>
906 <A NAME="equals(org.openafs.jafs.Key)"><!-- --></A><H3>
909 public boolean <B>equals</B>(<A HREF="../../../org/openafs/jafs/Key.html">Key</A> otherKey)</PRE>
911 <DD>Tests whether two <code>Key</code> objects are equal, based on their
912 encryption key, version, and associated Server.
918 <DT><B>Parameters:</B><DD><CODE>otherKey</CODE> - the Key to test
919 <DT><B>Returns:</B><DD>whether the specifed Key is the same as this Key</DL>
924 <A NAME="toString()"><!-- --></A><H3>
927 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE>
929 <DD>Returns the name of this <CODE>Key</CODE>
932 <DT><B>Overrides:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()">toString</A></CODE> in class <CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A></CODE></DL>
936 <DT><B>Returns:</B><DD>the name of this <CODE>Key</CODE></DL>
941 <A NAME="getKeyInfo(int, int, org.openafs.jafs.Key)"><!-- --></A><H3>
944 protected static void <B>getKeyInfo</B>(int serverHandle,
946 <A HREF="../../../org/openafs/jafs/Key.html">Key</A> key)
947 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
949 <DD>Fills in the information fields of the provided <code>Key</code>.
955 <DT><B>Parameters:</B><DD><CODE>serverHandle</CODE> - the bos handle of the server to which the key
956 belongs<DD><CODE>version</CODE> - the version of the key for which to get the information<DD><CODE>key</CODE> - the <code>Key</code> object in which to fill in the
959 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code<DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Server.html#getBosServerHandle(int, java.lang.String)"><CODE>Server.getBosServerHandle(int, java.lang.String)</CODE></A>,
960 <A HREF="../../../org/openafs/jafs/Server.html"><CODE>Server</CODE></A></DL>
965 <A NAME="create(int, int, int, java.lang.String)"><!-- --></A><H3>
968 protected static void <B>create</B>(int cellHandle,
969 int serverHandle,
970 int versionNumber,
971 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> keyString)
972 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
974 <DD>Create a server key.
980 <DT><B>Parameters:</B><DD><CODE>cellHandle</CODE> - the handle of the cell to which the server belongs<DD><CODE>serverHandle</CODE> - the bos handle of the server to which the key will
981 belong<DD><CODE>versionNumber</CODE> - the version number of the key to create (0 to 255)<DD><CODE>keyString</CODE> - the <code>String</code> version of the key that will
984 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code<DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Cell.html#getCellHandle()"><CODE>Cell.getCellHandle()</CODE></A>,
985 <A HREF="../../../org/openafs/jafs/Server.html#getBosServerHandle(int, java.lang.String)"><CODE>Server.getBosServerHandle(int, java.lang.String)</CODE></A></DL>
990 <A NAME="delete(int, int)"><!-- --></A><H3>
993 protected static void <B>delete</B>(int serverHandle,
994 int versionNumber)
995 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
997 <DD>Delete a server key.
1003 <DT><B>Parameters:</B><DD><CODE>serverHandle</CODE> - the bos handle of the server to which the key belongs<DD><CODE>versionNumber</CODE> - the version number of the key to remove (0 to 255)
1005 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code<DT><B>See Also:</B><DD><A HREF="../../../org/openafs/jafs/Server.html#getBosServerHandle(int, java.lang.String)"><CODE>Server.getBosServerHandle(int, java.lang.String)</CODE></A></DL>
1010 <A NAME="reclaimKeyMemory()"><!-- --></A><H3>
1011 reclaimKeyMemory</H3>
1013 protected static void <B>reclaimKeyMemory</B>()</PRE>
1015 <DD>Reclaims all memory being saved by the key portion of the native library.
1016 This method should be called when no more <code>Key</code> objects are
1027 <!-- ========= END OF CLASS DATA ========= -->
1030 <!-- ========== START OF NAVBAR ========== -->
1031 <A NAME="navbar_bottom"><!-- --></A>
1032 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
1034 <TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
1035 <A NAME="navbar_bottom_firstrow"><!-- --></A>
1036 <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
1037 <TR ALIGN="center" VALIGN="top">
1038 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
1039 <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
1040 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Key.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
1041 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
1042 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
1043 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
1044 <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
1048 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1049 <B>JAFS API v2</B></EM>
1054 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1055 <A HREF="../../../org/openafs/jafs/Group.html"><B>PREV CLASS</B></A>
1056 <A HREF="../../../org/openafs/jafs/Partition.html"><B>NEXT CLASS</B></A></FONT></TD>
1057 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1058 <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>
1059 <A HREF="Key.html" TARGET="_top"><B>NO FRAMES</B></A>
1064 document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
1069 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
1074 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1075 SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
1076 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1077 DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
1080 <!-- =========== END OF NAVBAR =========== -->