Package com.sun.faban.harness.agent

Examples of com.sun.faban.harness.agent.FileAgent.open()


        logger.fine("CmdService: Copying " + srcfile + " from " + srcmachine + " to " + destfile + " in " + destmachine);

        srcf = filep.get(sidx);
        destf = filep.get(didx);
        try {
            srcfilep = srcf.open(srcfile, FileAgent.READ);
            if (append) {
                destfilep = destf.open(destfile, FileAgent.APPEND);
            } else {
                destfilep = destf.open(destfile, FileAgent.WRITE);
            }
View Full Code Here


        FileService srcfilep = null;
        byte[] buf = null;

        FileAgent srcf = findFileAgent(srcmachine);
        try {
            srcfilep = srcf.open(srcfile, FileAgent.READ);

            // Now loop, reading from src and writing to dest
            while (true) {
                buf = srcfilep.readBytes(1000000);
                //  logger.info("           Read " + buf);
View Full Code Here

            BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
            byte[] buf = new byte[8192];
            int i = in.read(buf);

            if(i > 0) {
                FileService outfp = fa.open(outFile, FileAgent.WRITE);
                while (i > 0) {
                    outfp.writeBytes(buf, 0, i);
                    i = in.read(buf);
                }
                outfp.close();
View Full Code Here

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.