KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > SidFragment


1 import jcifs.smb.*;
2
3 public class SidFragment {
4
5     public static void main(String JavaDoc[] argv) throws Exception JavaDoc {
6         if (argv.length < 1) {
7             System.err.println("usage: SidFragment <textual domain sid>");
8             return;
9         }
10
11         SID domsid = new SID(argv[0]);
12         int rid = 1120;
13         int count = 150;
14         int si;
15
16         SID[] sids = new SID[count];
17
18         for (si = 0; si < sids.length; si++) {
19             sids[si] = new SID(domsid, rid++);
20         }
21
22         SID.resolveSids("ts0", null, sids);
23
24         for (si = 0; si < sids.length; si++) {
25             System.out.println(sids[si].toString());
26         }
27     }
28 }
29
Popular Tags