???????Java??????
???????????? ???????[ 2014/6/19 10:54:52 ] ????????Java ???????
private String readRequestFromSocket(Socket connection) throws IOException {
InputStream in = new BufferedInputStream(connection.getInputStream());
StringBuffer request = new StringBuffer(80);
while (true) {
int readByte = in.read();
if (readByte == '
' || readByte == '
' || readByte == -1)
break;
request.append((char) readByte);
}
return request.toString();
}
private void writeToSocket(Socket connection?? boolean writeHeader)
throws IOException {
OutputStream out = new BufferedOutputStream(
connection.getOutputStream());
if (writeHeader) {
out.write(header);
}
out.write(content);
out.flush();
}
public static void main(String[] args) {
String fileName = "index.html";
String contentType = "text/html";
String encoding = "ASCII";
int port = 80;
byte[] data = readFileToByteArray(fileName);
try {
new SingleFileHttpServer(data?? encoding?? contentType?? port).start();
} catch (UnsupportedEncodingException e) {
e.printStackTrace();
}
}
private static byte[] readFileToByteArray(String fileName) {
byte[] data = null;
try {
InputStream in = new FileInputStream(fileName);
ByteArrayOutputStream out = new ByteArrayOutputStream();
int readByte;
while ((readByte = in.read()) != -1)
out.write(readByte);
data = out.toByteArray();
in.close();
} catch (IOException e) {
e.printStackTrace();
}
return data;
}
}
|
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
Java???????????Щ???????????????Java????????????????Java?б???Map????????Java Web???????????????Java??????????????д?????Java????????7???????????????????????(java .net ?????)???Java??????????Python??????Java webdriver??λ????????′????е?????Java??д??????????????????Java???????????????JavaScript????????????Java?????????????????? Java???????10??????????????Java?м????????????????java???????ü???????????м???????????????????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????