??????????????????????????????д???????ν?
????InputStream is ??????????????????
/*
* LoadRunner Java script. (Build: _build_number_)
*
* Script Description:
*
*/
import lrapi.lr;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import com.google.common.io.ByteStreams;
import com.jd.jfs.JingdongFileSystem;
public class Actions
{
File file = new File("C:/8K.file");
InputStream is =null; // ???????byte????<pre code_snippet_id="145362" snippet_file_name="blog_20140107_2_8044261" name="code" class="java">         byte[] fileBytes = new byte[(int) file.length()];
// ????????????????????????
JingdongFileSystem jfs =new JingdongFileSystem();
public int init() throws Throwable {
is = new FileInputStream(file);
ByteStreams.readFully(is?? fileBytes);
is.close();
//jfs = new JingdongFileSystem();
return 0;
} //end of init
public int action() throws Throwable {
try {
lr.start_transaction("jfs-w");
String key = jfs.writeBytes(fileBytes);
//???
System.out.println(key);
} catch (Exception e) {
e.printStackTrace();
}
lr.end_transaction("jfs-w"?? lr.AUTO);
return 0;
}//end of action
public int end() throws Throwable {
return 0;
}//end of end
}