KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > OpenExclusive


1 import jcifs.smb.SmbFile;
2 import jcifs.smb.SmbFileOutputStream;
3
4 public class OpenExclusive {
5
6     public static void main( String JavaDoc argv[] ) throws Exception JavaDoc {
7         SmbFileOutputStream out;
8         SmbFile f = new SmbFile( argv[0], "", null, SmbFile.FILE_NO_SHARE );
9         out = new SmbFileOutputStream( f );
10 System.in.read();
11         out.close();
12 System.in.read();
13 // OR
14
out = new SmbFileOutputStream( argv[1], SmbFile.FILE_NO_SHARE );
15 System.in.read();
16         out.close();
17 System.in.read();
18     }
19 }
20
21
Popular Tags