Package

Source Code of GrowWrite

import jcifs.smb.SmbFile;
import jcifs.smb.SmbFileOutputStream;
import java.io.FileInputStream;

public class GrowWrite {

    static final int SIZE = 0xFFF;

    public static void main( String argv[] ) throws Exception {
        int n, tot;
        byte[] buf = new byte[SIZE];
        SmbFile f = new SmbFile( argv[0] );
        SmbFileOutputStream out = new SmbFileOutputStream( f );

        n = tot = 0;
        do {
            if(( n % 0x1F ) == 0) {
                f = new SmbFile( argv[0] );
                out = new SmbFileOutputStream( f );
                System.out.print( '#' );
            }
            out.write( buf, 0, n );
            out.flush();
            tot += n;
        } while( n++ < SIZE );

        System.out.println();
        System.out.println( tot + " bytes transfered." );
    }
}
TOP

Related Classes of GrowWrite

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.