?? httpperftaskparam.java
字號:
package com.ict.netcom2.task;
import java.io.*;
public class HttpPerfTaskParam extends TaskParam {
private long testTimes;
private int port;
private int interval;
private int prototype;
private String url;
public HttpPerfTaskParam(long testTimes, int port, int interval,
int prototype, String url) {
this.testTimes = testTimes;
this.port = port;
this.interval = interval;
this.prototype = prototype;
this.url = url;
encode();
}
private void encode() {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
DataOutputStream dos = new DataOutputStream(baos);
try {
dos.writeInt((int) (testTimes));
dos.writeShort(url.length());
dos.writeShort(port);
dos.writeShort(interval);
dos.writeShort(prototype);
dos.writeBytes(url);
dos.close();
baos.close();
} catch (IOException e) {
e.printStackTrace();
}
paramCode = baos.toByteArray();
}
}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -