if (newestVersionName == null) {
return;
}
HttpMessage msg = new HttpMessage();
try {
msg.setRequestHeader(header);
msg.setRequestBody(getBody(mirrorList[getRandom(mirrorList.length)], newestVersionName));
getHttpSender().sendAndReceive(msg,true);
if (msg.getResponseHeader().getStatusCode() != HttpStatusCode.OK) {
throw new IOException();
}
if (silent && manualCheckStarted) {
return;
}
File file = null;
if (Constant.isWindows()) {
file = new File("parosnew.exe");
} else if (Constant.isLinux()) {
file = new File("parosnew.zip");
}
FileOutputStream os = new FileOutputStream(file);
os.write(msg.getResponseBody().getBytes());
os.close();
try {
final File updateFile = file;