Improvement: add graphical ui
This commit is contained in:
@@ -714,6 +714,41 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager
|
||||
return ServerCode.UNKNOWN;
|
||||
}
|
||||
|
||||
public byte[] getLastRender() {
|
||||
try {
|
||||
HttpURLConnection httpCon = this.HTTPRequest(this.getPage("last-render-frame"));
|
||||
|
||||
InputStream inStrm = httpCon.getInputStream();
|
||||
if (httpCon.getResponseCode() != HttpURLConnection.HTTP_OK) {
|
||||
this.log.debug("Server::getLastRender code not ok " + httpCon.getResponseCode());
|
||||
return null;
|
||||
}
|
||||
int size = httpCon.getContentLength();
|
||||
|
||||
if (size == 0) {
|
||||
this.log.debug("Server::getLastRender size is 0");
|
||||
return null;
|
||||
}
|
||||
|
||||
byte[] ret = new byte[size];
|
||||
byte[] ch = new byte[512 * 1024];
|
||||
int n = 0;
|
||||
int i = 0;
|
||||
while ((n = inStrm.read(ch)) != -1) {
|
||||
System.arraycopy(ch, 0, ret, i, n);
|
||||
i += n;
|
||||
}
|
||||
inStrm.close();
|
||||
return ret;
|
||||
}
|
||||
catch (Exception e) {
|
||||
System.err.println("Server::getLastRender exception " + e);
|
||||
e.printStackTrace();
|
||||
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private String generateXMLForMD5cache() {
|
||||
String xml_str = null;
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user