Refactor file layout
[openafs-wiki.git] / archive / JavaAdminAPI / Key.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN""http://www.w3.org/TR/REC-html40/loose.dtd">
2 <!--NewPage-->
3 <HTML>
4 <HEAD>
5 <!-- Generated by javadoc on Mon Jun 09 15:53:37 PDT 2003 -->
6 <TITLE>
7 Key (Java AFS API)
8 </TITLE>
9 <META NAME="keywords" CONTENT="org.openafs.jafs.Key,Key class">
10 <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
11 </HEAD>
12 <SCRIPT>
13 function asd()
14 {
15 parent.document.title="Key (Java AFS API)";
16 }
17 </SCRIPT>
18 <BODY BGCOLOR="white" onload="asd();">
19
20 <!-- ========== START OF NAVBAR ========== -->
21 <A NAME="navbar_top"><!-- --></A>
22 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
23 <TR>
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>&nbsp;</TD>
29   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
30   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Key.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
31   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
32   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
33   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
34   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
35   </TR>
36 </TABLE>
37 </TD>
38 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
39 <B>JAFS API v2</B></EM>
40 </TD>
41 </TR>
42
43 <TR>
44 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
45 &nbsp;<A HREF="../../../org/openafs/jafs/Group.html"><B>PREV CLASS</B></A>&nbsp;
46 &nbsp;<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>  &nbsp;
49 &nbsp;<A HREF="Key.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
50 &nbsp;
51 <SCRIPT>
52   <!--
53   if(window==top) {
54     document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
55   }
56   //-->
57 </SCRIPT>
58 <NOSCRIPT>
59 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
60 </NOSCRIPT>
61 </FONT></TD>
62 </TR>
63 <TR>
64 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
65   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
66 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
67 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
68 </TR>
69 </TABLE>
70 <!-- =========== END OF NAVBAR =========== -->
71
72 <HR>
73 <!-- ======== START OF CLASS DATA ======== -->
74 <H2>
75 <FONT SIZE="-1">
76 org.openafs.jafs</FONT>
77 <BR>
78 Class Key</H2>
79 <PRE>
80 <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">java.lang.Object</A>
81   |
82   +--<B>org.openafs.jafs.Key</B>
83 </PRE>
84 <DL>
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>
86 </DL>
87 <HR>
88 <DL>
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>
90
91 <P>
92 An abstract representation of an AFS key.  It holds information about 
93  the key, such as what its version is.
94  <BR><BR>
95
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>
105
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.
110  <PRE>
111  import org.openafs.jafs.Cell;
112  import org.openafs.jafs.AFSException;
113  import org.openafs.jafs.Key;
114  import org.openafs.jafs.Server;
115  ...
116  public class ...
117  {
118    ...
119    private Cell cell;
120    private Server server;
121    ...
122    public static void main(String[] args) throws Exception
123    {
124      String username   = arg[0];
125      String password   = arg[1];
126      String cellName   = arg[2];
127      String serverName = arg[3];
128  
129      token = new Token(username, password, cellName);
130      cell   = new Cell(token);
131      server  = new Server(serverName, cell);
132  
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] );
137      }
138    }
139    ...
140  }
141  </PRE>
142 <P>
143
144 <P>
145 <DL>
146 <DT><B>See Also:</B><DD><A HREF="../../../serialized-form.html" TARGET="org.openafs.jafs.Key">Serialized Form</A></DL>
147 <HR>
148
149 <P>
150 <!-- ======== NESTED CLASS SUMMARY ======== -->
151
152
153 <!-- =========== FIELD SUMMARY =========== -->
154
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>
160 </TR>
161 <TR BGCOLOR="white" CLASS="TableRowColor">
162 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
163 <CODE>protected &nbsp;boolean</CODE></FONT></TD>
164 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#cachedInfo">cachedInfo</A></B></CODE>
165
166 <BR>
167 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
168 </TR>
169 <TR BGCOLOR="white" CLASS="TableRowColor">
170 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
171 <CODE>protected &nbsp;long</CODE></FONT></TD>
172 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#checkSum">checkSum</A></B></CODE>
173
174 <BR>
175 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
176 </TR>
177 <TR BGCOLOR="white" CLASS="TableRowColor">
178 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
179 <CODE>protected &nbsp;<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>
181
182 <BR>
183 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
184 </TR>
185 <TR BGCOLOR="white" CLASS="TableRowColor">
186 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
187 <CODE>protected &nbsp;int</CODE></FONT></TD>
188 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#lastModDate">lastModDate</A></B></CODE>
189
190 <BR>
191 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
192 </TR>
193 <TR BGCOLOR="white" CLASS="TableRowColor">
194 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
195 <CODE>protected &nbsp;<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>
197
198 <BR>
199 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
200 </TR>
201 <TR BGCOLOR="white" CLASS="TableRowColor">
202 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
203 <CODE>protected &nbsp;int</CODE></FONT></TD>
204 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#lastModMs">lastModMs</A></B></CODE>
205
206 <BR>
207 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
208 </TR>
209 <TR BGCOLOR="white" CLASS="TableRowColor">
210 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
211 <CODE>protected &nbsp;<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>
213
214 <BR>
215 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
216 </TR>
217 <TR BGCOLOR="white" CLASS="TableRowColor">
218 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
219 <CODE>protected &nbsp;int</CODE></FONT></TD>
220 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#version">version</A></B></CODE>
221
222 <BR>
223 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
224 </TR>
225 </TABLE>
226 &nbsp;
227 <!-- ======== CONSTRUCTOR SUMMARY ======== -->
228
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>
234 </TR>
235 <TR BGCOLOR="white" CLASS="TableRowColor">
236 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
237 <CODE>&nbsp;</CODE></FONT></TD>
238 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#Key(int, org.openafs.jafs.Server)">Key</A></B>(int&nbsp;version,
239     <A HREF="../../../org/openafs/jafs/Server.html">Server</A>&nbsp;server)</CODE>
240
241 <BR>
242 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
245 </TR>
246 <TR BGCOLOR="white" CLASS="TableRowColor">
247 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
248 <CODE>&nbsp;</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&nbsp;version,
250     <A HREF="../../../org/openafs/jafs/Server.html">Server</A>&nbsp;server,
251     boolean&nbsp;preloadAllMembers)</CODE>
252
253 <BR>
254 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
257 </TR>
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>&nbsp;server)</CODE>
262
263 <BR>
264 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a blank <code>Key</code> given the server to which the key
265  belongs.  </TD>
266 </TR>
267 </TABLE>
268 &nbsp;
269 <!-- ========== METHOD SUMMARY =========== -->
270
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>
276 </TR>
277 <TR BGCOLOR="white" CLASS="TableRowColor">
278 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
279 <CODE>&nbsp;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>&nbsp;key)</CODE>
281
282 <BR>
283 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compares two Key objects respective to their key version and does not
284  factor any other attribute.</TD>
285 </TR>
286 <TR BGCOLOR="white" CLASS="TableRowColor">
287 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
288 <CODE>&nbsp;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>&nbsp;obj)</CODE>
290
291 <BR>
292 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Comparable interface method.</TD>
293 </TR>
294 <TR BGCOLOR="white" CLASS="TableRowColor">
295 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
296 <CODE>protected static&nbsp;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&nbsp;cellHandle,
298        int&nbsp;serverHandle,
299        int&nbsp;versionNumber,
300        <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;keyString)</CODE>
301
302 <BR>
303 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create a server key.</TD>
304 </TR>
305 <TR BGCOLOR="white" CLASS="TableRowColor">
306 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
307 <CODE>&nbsp;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>&nbsp;keyString)</CODE>
309
310 <BR>
311 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>
313 </TR>
314 <TR BGCOLOR="white" CLASS="TableRowColor">
315 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
316 <CODE>&nbsp;void</CODE></FONT></TD>
317 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#delete()">delete</A></B>()</CODE>
318
319 <BR>
320 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the key with this <code>Key's</code> version number from 
321  the server.</TD>
322 </TR>
323 <TR BGCOLOR="white" CLASS="TableRowColor">
324 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
325 <CODE>protected static&nbsp;void</CODE></FONT></TD>
326 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#delete(int, int)">delete</A></B>(int&nbsp;serverHandle,
327        int&nbsp;versionNumber)</CODE>
328
329 <BR>
330 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Delete a server key.</TD>
331 </TR>
332 <TR BGCOLOR="white" CLASS="TableRowColor">
333 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
334 <CODE>&nbsp;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>&nbsp;otherKey)</CODE>
336
337 <BR>
338 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests whether two <code>Key</code> objects are equal, based on their 
339  encryption key, version, and associated Server.</TD>
340 </TR>
341 <TR BGCOLOR="white" CLASS="TableRowColor">
342 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
343 <CODE>&nbsp;long</CODE></FONT></TD>
344 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getCheckSum()">getCheckSum</A></B>()</CODE>
345
346 <BR>
347 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the check sum of this key.</TD>
348 </TR>
349 <TR BGCOLOR="white" CLASS="TableRowColor">
350 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
351 <CODE>&nbsp;<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>
353
354 <BR>
355 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the encrypted key as a string in octal form. </TD>
356 </TR>
357 <TR BGCOLOR="white" CLASS="TableRowColor">
358 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
359 <CODE>protected &nbsp;<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>
361
362 <BR>
363 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a <code>String</code> representation of this <code>Key</code>.  
364  </TD>
365 </TR>
366 <TR BGCOLOR="white" CLASS="TableRowColor">
367 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
368 <CODE>protected static&nbsp;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&nbsp;serverHandle,
370            int&nbsp;version,
371            <A HREF="../../../org/openafs/jafs/Key.html">Key</A>&nbsp;key)</CODE>
372
373 <BR>
374 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Fills in the information fields of the provided <code>Key</code>.</TD>
375 </TR>
376 <TR BGCOLOR="white" CLASS="TableRowColor">
377 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
378 <CODE>&nbsp;<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>
380
381 <BR>
382 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the last modification date of this key.</TD>
383 </TR>
384 <TR BGCOLOR="white" CLASS="TableRowColor">
385 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
386 <CODE>&nbsp;<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>
388
389 <BR>
390 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the server this key is associated with.</TD>
391 </TR>
392 <TR BGCOLOR="white" CLASS="TableRowColor">
393 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
394 <CODE>&nbsp;int</CODE></FONT></TD>
395 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#getVersion()">getVersion</A></B>()</CODE>
396
397 <BR>
398 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the version of this key in primitive form.</TD>
399 </TR>
400 <TR BGCOLOR="white" CLASS="TableRowColor">
401 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
402 <CODE>protected static&nbsp;void</CODE></FONT></TD>
403 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#reclaimKeyMemory()">reclaimKeyMemory</A></B>()</CODE>
404
405 <BR>
406 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reclaims all memory being saved by the key portion of the native library.
407  </TD>
408 </TR>
409 <TR BGCOLOR="white" CLASS="TableRowColor">
410 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
411 <CODE>&nbsp;void</CODE></FONT></TD>
412 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#refresh()">refresh</A></B>()</CODE>
413
414 <BR>
415 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Refreshes the properties of this Key object instance with values from 
416  the AFS key it represents.  </TD>
417 </TR>
418 <TR BGCOLOR="white" CLASS="TableRowColor">
419 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
420 <CODE>protected &nbsp;void</CODE></FONT></TD>
421 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#refresh(boolean)">refresh</A></B>(boolean&nbsp;all)</CODE>
422
423 <BR>
424 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Refreshes the properties of this Key object instance with values from 
425  the AFS key it represents.  </TD>
426 </TR>
427 <TR BGCOLOR="white" CLASS="TableRowColor">
428 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
429 <CODE>protected &nbsp;void</CODE></FONT></TD>
430 <TD><CODE><B><A HREF="../../../org/openafs/jafs/Key.html#refreshInfo()">refreshInfo</A></B>()</CODE>
431
432 <BR>
433 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Refreshes the information fields of this <code>Key</code> to reflect the 
434  current state of the AFS server key.  </TD>
435 </TR>
436 <TR BGCOLOR="white" CLASS="TableRowColor">
437 <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
438 <CODE>&nbsp;<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>
440
441 <BR>
442 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the name of this <CODE>Key</CODE></TD>
443 </TR>
444 </TABLE>
445 &nbsp;<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>
449 </TR>
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>
452 </TR>
453 </TABLE>
454 &nbsp;
455 <P>
456
457 <!-- ============ FIELD DETAIL =========== -->
458
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>
464 </TR>
465 </TABLE>
466
467 <A NAME="server"><!-- --></A><H3>
468 server</H3>
469 <PRE>
470 protected <A HREF="../../../org/openafs/jafs/Server.html">Server</A> <B>server</B></PRE>
471 <DL>
472 <DL>
473 </DL>
474 </DL>
475 <HR>
476
477 <A NAME="version"><!-- --></A><H3>
478 version</H3>
479 <PRE>
480 protected int <B>version</B></PRE>
481 <DL>
482 <DL>
483 </DL>
484 </DL>
485 <HR>
486
487 <A NAME="checkSum"><!-- --></A><H3>
488 checkSum</H3>
489 <PRE>
490 protected long <B>checkSum</B></PRE>
491 <DL>
492 <DL>
493 </DL>
494 </DL>
495 <HR>
496
497 <A NAME="encryptionKey"><!-- --></A><H3>
498 encryptionKey</H3>
499 <PRE>
500 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>encryptionKey</B></PRE>
501 <DL>
502 <DL>
503 </DL>
504 </DL>
505 <HR>
506
507 <A NAME="lastModDate"><!-- --></A><H3>
508 lastModDate</H3>
509 <PRE>
510 protected int <B>lastModDate</B></PRE>
511 <DL>
512 <DL>
513 </DL>
514 </DL>
515 <HR>
516
517 <A NAME="lastModMs"><!-- --></A><H3>
518 lastModMs</H3>
519 <PRE>
520 protected int <B>lastModMs</B></PRE>
521 <DL>
522 <DL>
523 </DL>
524 </DL>
525 <HR>
526
527 <A NAME="lastModDateDate"><!-- --></A><H3>
528 lastModDateDate</H3>
529 <PRE>
530 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/GregorianCalendar.html">GregorianCalendar</A> <B>lastModDateDate</B></PRE>
531 <DL>
532 <DL>
533 </DL>
534 </DL>
535 <HR>
536
537 <A NAME="cachedInfo"><!-- --></A><H3>
538 cachedInfo</H3>
539 <PRE>
540 protected boolean <B>cachedInfo</B></PRE>
541 <DL>
542 <DL>
543 </DL>
544 </DL>
545
546 <!-- ========= CONSTRUCTOR DETAIL ======== -->
547
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>
553 </TR>
554 </TABLE>
555
556 <A NAME="Key(int, org.openafs.jafs.Server)"><!-- --></A><H3>
557 Key</H3>
558 <PRE>
559 public <B>Key</B>(int&nbsp;version,
560            <A HREF="../../../org/openafs/jafs/Server.html">Server</A>&nbsp;server)
561     throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
562 <DL>
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.
571 <P>
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.
573 <DT><B>Throws:</B>
574 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
575 <HR>
576
577 <A NAME="Key(int, org.openafs.jafs.Server, boolean)"><!-- --></A><H3>
578 Key</H3>
579 <PRE>
580 public <B>Key</B>(int&nbsp;version,
581            <A HREF="../../../org/openafs/jafs/Server.html">Server</A>&nbsp;server,
582            boolean&nbsp;preloadAllMembers)
583     throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
584 <DL>
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
594  be thrown. 
595
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 
600  concerns.
601 <P>
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.
605 <DT><B>Throws:</B>
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>
607 <HR>
608
609 <A NAME="Key(org.openafs.jafs.Server)"><!-- --></A><H3>
610 Key</H3>
611 <PRE>
612 <B>Key</B>(<A HREF="../../../org/openafs/jafs/Server.html">Server</A>&nbsp;server)
613 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
614 <DL>
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.
618 <P>
619 <DT><B>Parameters:</B><DD><CODE>server</CODE> - the server to which the key belongs.
620 <DT><B>Throws:</B>
621 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
622
623 <!-- ============ METHOD DETAIL ========== -->
624
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>
630 </TR>
631 </TABLE>
632
633 <A NAME="refresh()"><!-- --></A><H3>
634 refresh</H3>
635 <PRE>
636 public void <B>refresh</B>()
637              throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
638 <DL>
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.
643
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 
653  unnecessary.
654 <P>
655 <DD><DL>
656 </DL>
657 </DD>
658 <DD><DL>
659
660 <DT><B>Throws:</B>
661 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
662 </DD>
663 </DL>
664 <HR>
665
666 <A NAME="refresh(boolean)"><!-- --></A><H3>
667 refresh</H3>
668 <PRE>
669 protected void <B>refresh</B>(boolean&nbsp;all)
670                 throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
671 <DL>
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.
677
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.
681 <P>
682 <DD><DL>
683 </DL>
684 </DD>
685 <DD><DL>
686 <DT><B>Parameters:</B><DD><CODE>all</CODE> - if true set or renew all object properties; otherwise renew 
687  all set properties
688 <DT><B>Throws:</B>
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>
690 </DD>
691 </DL>
692 <HR>
693
694 <A NAME="refreshInfo()"><!-- --></A><H3>
695 refreshInfo</H3>
696 <PRE>
697 protected void <B>refreshInfo</B>()
698                     throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
699 <DL>
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.
703 <P>
704 <DD><DL>
705 </DL>
706 </DD>
707 <DD><DL>
708
709 <DT><B>Throws:</B>
710 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
711 </DD>
712 </DL>
713 <HR>
714
715 <A NAME="create(java.lang.String)"><!-- --></A><H3>
716 create</H3>
717 <PRE>
718 public void <B>create</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;keyString)
719             throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
720 <DL>
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.
723 <P>
724 <DD><DL>
725 </DL>
726 </DD>
727 <DD><DL>
728 <DT><B>Parameters:</B><DD><CODE>keyString</CODE> - the string to use for the encryption key
729 <DT><B>Throws:</B>
730 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
731 </DD>
732 </DL>
733 <HR>
734
735 <A NAME="delete()"><!-- --></A><H3>
736 delete</H3>
737 <PRE>
738 public void <B>delete</B>()
739             throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
740 <DL>
741 <DD>Removes the key with this <code>Key's</code> version number from 
742  the server.
743 <P>
744 <DD><DL>
745 </DL>
746 </DD>
747 <DD><DL>
748
749 <DT><B>Throws:</B>
750 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
751 </DD>
752 </DL>
753 <HR>
754
755 <A NAME="getVersion()"><!-- --></A><H3>
756 getVersion</H3>
757 <PRE>
758 public int <B>getVersion</B>()</PRE>
759 <DL>
760 <DD>Returns the version of this key in primitive form.
761 <P>
762 <DD><DL>
763 </DL>
764 </DD>
765 <DD><DL>
766
767 <DT><B>Returns:</B><DD>the version number of this key</DL>
768 </DD>
769 </DL>
770 <HR>
771
772 <A NAME="getServer()"><!-- --></A><H3>
773 getServer</H3>
774 <PRE>
775 public <A HREF="../../../org/openafs/jafs/Server.html">Server</A> <B>getServer</B>()</PRE>
776 <DL>
777 <DD>Returns the server this key is associated with.
778 <P>
779 <DD><DL>
780 </DL>
781 </DD>
782 <DD><DL>
783
784 <DT><B>Returns:</B><DD>this key's server</DL>
785 </DD>
786 </DL>
787 <HR>
788
789 <A NAME="getEncryptionKey()"><!-- --></A><H3>
790 getEncryptionKey</H3>
791 <PRE>
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>
794 <DL>
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'.
798 <P>
799 <DD><DL>
800 </DL>
801 </DD>
802 <DD><DL>
803
804 <DT><B>Returns:</B><DD>the encrypted key
805 <DT><B>Throws:</B>
806 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
807 </DD>
808 </DL>
809 <HR>
810
811 <A NAME="getCheckSum()"><!-- --></A><H3>
812 getCheckSum</H3>
813 <PRE>
814 public long <B>getCheckSum</B>()
815                  throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
816 <DL>
817 <DD>Returns the check sum of this key.
818 <P>
819 <DD><DL>
820 </DL>
821 </DD>
822 <DD><DL>
823
824 <DT><B>Returns:</B><DD>the check sum of this key
825 <DT><B>Throws:</B>
826 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
827 </DD>
828 </DL>
829 <HR>
830
831 <A NAME="getLastModDate()"><!-- --></A><H3>
832 getLastModDate</H3>
833 <PRE>
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>
836 <DL>
837 <DD>Returns the last modification date of this key.
838 <P>
839 <DD><DL>
840 </DL>
841 </DD>
842 <DD><DL>
843
844 <DT><B>Returns:</B><DD>the last modification date of this key
845 <DT><B>Throws:</B>
846 <DD><CODE><A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></CODE> - If an error occurs in the native code</DL>
847 </DD>
848 </DL>
849 <HR>
850
851 <A NAME="getInfo()"><!-- --></A><H3>
852 getInfo</H3>
853 <PRE>
854 protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>getInfo</B>()</PRE>
855 <DL>
856 <DD>Returns a <code>String</code> representation of this <code>Key</code>.  
857  Contains the information fields.
858 <P>
859 <DD><DL>
860 </DL>
861 </DD>
862 <DD><DL>
863
864 <DT><B>Returns:</B><DD>a <code>String</code> representation of the <code>Key</code></DL>
865 </DD>
866 </DL>
867 <HR>
868
869 <A NAME="compareTo(org.openafs.jafs.Key)"><!-- --></A><H3>
870 compareTo</H3>
871 <PRE>
872 public int <B>compareTo</B>(<A HREF="../../../org/openafs/jafs/Key.html">Key</A>&nbsp;key)</PRE>
873 <DL>
874 <DD>Compares two Key objects respective to their key version and does not
875  factor any other attribute.
876 <P>
877 <DD><DL>
878 </DL>
879 </DD>
880 <DD><DL>
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>
886 </DD>
887 </DL>
888 <HR>
889
890 <A NAME="compareTo(java.lang.Object)"><!-- --></A><H3>
891 compareTo</H3>
892 <PRE>
893 public int <B>compareTo</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html">Object</A>&nbsp;obj)</PRE>
894 <DL>
895 <DD>Comparable interface method.
896 <P>
897 <DD><DL>
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>
899 </DD>
900 <DD><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>
902 </DD>
903 </DL>
904 <HR>
905
906 <A NAME="equals(org.openafs.jafs.Key)"><!-- --></A><H3>
907 equals</H3>
908 <PRE>
909 public boolean <B>equals</B>(<A HREF="../../../org/openafs/jafs/Key.html">Key</A>&nbsp;otherKey)</PRE>
910 <DL>
911 <DD>Tests whether two <code>Key</code> objects are equal, based on their 
912  encryption key, version, and associated Server.
913 <P>
914 <DD><DL>
915 </DL>
916 </DD>
917 <DD><DL>
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>
920 </DD>
921 </DL>
922 <HR>
923
924 <A NAME="toString()"><!-- --></A><H3>
925 toString</H3>
926 <PRE>
927 public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE>
928 <DL>
929 <DD>Returns the name of this <CODE>Key</CODE>
930 <P>
931 <DD><DL>
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>
933 </DD>
934 <DD><DL>
935
936 <DT><B>Returns:</B><DD>the name of this <CODE>Key</CODE></DL>
937 </DD>
938 </DL>
939 <HR>
940
941 <A NAME="getKeyInfo(int, int, org.openafs.jafs.Key)"><!-- --></A><H3>
942 getKeyInfo</H3>
943 <PRE>
944 protected static void <B>getKeyInfo</B>(int&nbsp;serverHandle,
945                                  int&nbsp;version,
946                                  <A HREF="../../../org/openafs/jafs/Key.html">Key</A>&nbsp;key)
947                           throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
948 <DL>
949 <DD>Fills in the information fields of the provided <code>Key</code>.
950 <P>
951 <DD><DL>
952 </DL>
953 </DD>
954 <DD><DL>
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 
957                 information
958 <DT><B>Throws:</B>
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>
961 </DD>
962 </DL>
963 <HR>
964
965 <A NAME="create(int, int, int, java.lang.String)"><!-- --></A><H3>
966 create</H3>
967 <PRE>
968 protected static void <B>create</B>(int&nbsp;cellHandle,
969                              int&nbsp;serverHandle,
970                              int&nbsp;versionNumber,
971                              <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html">String</A>&nbsp;keyString)
972                       throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
973 <DL>
974 <DD>Create a server key.
975 <P>
976 <DD><DL>
977 </DL>
978 </DD>
979 <DD><DL>
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
982                       be encrypted
983 <DT><B>Throws:</B>
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>
986 </DD>
987 </DL>
988 <HR>
989
990 <A NAME="delete(int, int)"><!-- --></A><H3>
991 delete</H3>
992 <PRE>
993 protected static void <B>delete</B>(int&nbsp;serverHandle,
994                              int&nbsp;versionNumber)
995                       throws <A HREF="../../../org/openafs/jafs/AFSException.html">AFSException</A></PRE>
996 <DL>
997 <DD>Delete a server key.
998 <P>
999 <DD><DL>
1000 </DL>
1001 </DD>
1002 <DD><DL>
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)
1004 <DT><B>Throws:</B>
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>
1006 </DD>
1007 </DL>
1008 <HR>
1009
1010 <A NAME="reclaimKeyMemory()"><!-- --></A><H3>
1011 reclaimKeyMemory</H3>
1012 <PRE>
1013 protected static void <B>reclaimKeyMemory</B>()</PRE>
1014 <DL>
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 
1017  expected to be
1018  used.
1019 <P>
1020 <DD><DL>
1021 </DL>
1022 </DD>
1023 <DD><DL>
1024 </DL>
1025 </DD>
1026 </DL>
1027 <!-- ========= END OF CLASS DATA ========= -->
1028 <HR>
1029
1030 <!-- ========== START OF NAVBAR ========== -->
1031 <A NAME="navbar_bottom"><!-- --></A>
1032 <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
1033 <TR>
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>&nbsp;</TD>
1039   <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
1040   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Key.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
1041   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
1042   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
1043   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
1044   <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
1045   </TR>
1046 </TABLE>
1047 </TD>
1048 <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
1049 <B>JAFS API v2</B></EM>
1050 </TD>
1051 </TR>
1052
1053 <TR>
1054 <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
1055 &nbsp;<A HREF="../../../org/openafs/jafs/Group.html"><B>PREV CLASS</B></A>&nbsp;
1056 &nbsp;<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>  &nbsp;
1059 &nbsp;<A HREF="Key.html" TARGET="_top"><B>NO FRAMES</B></A>  &nbsp;
1060 &nbsp;
1061 <SCRIPT>
1062   <!--
1063   if(window==top) {
1064     document.writeln('<A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>');
1065   }
1066   //-->
1067 </SCRIPT>
1068 <NOSCRIPT>
1069 <A HREF="../../../allclasses-noframe.html" TARGET=""><B>All Classes</B></A>
1070 </NOSCRIPT>
1071 </FONT></TD>
1072 </TR>
1073 <TR>
1074 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1075   SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
1076 <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
1077 DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
1078 </TR>
1079 </TABLE>
1080 <!-- =========== END OF NAVBAR =========== -->
1081
1082 <HR>
1083
1084 </BODY>
1085 </HTML>