out.write("*** InstallManager performance test ***");
out.newLine();
+ out.write("Sdk package size\t: " + sdkPackageSize);
+ out.newLine();
out.write("The initialization time\t: " + getInitializeTime() + "sec");
out.write("(" + getBitPerSecond(sdkPackageSize, getInitializeTime())+ "b/s)");
out.newLine();
} catch (IOException e) {
Log.ExceptionLog(e);
- }
-
- if (out != null) {
- try {
- out.close();
- } catch (IOException e) {
- Log.ExceptionLog(e);
+ } finally {
+ if (out != null) {
+ try {
+ out.close();
+ } catch (IOException e) {
+ Log.ExceptionLog(e);
+ }
}
}
}
try {
objfile.write(bufLogTitle.toString());
objfile.write(newLine);
- objfile.flush();
} catch (IOException e) {
Log.ExceptionLog(e);
}
try {
objfile.write(timeStr() + " " + str);
objfile.write(newLine);
- objfile.flush();
} catch (IOException e) {
// TODO
Log.ExceptionLog(e);
import java.util.zip.ZipEntry;
import java.util.zip.ZipInputStream;
+import org.apache.commons.io.IOUtils;
import org.tizen.installmanager.core.IMFatalException;
import org.tizen.installmanager.lib.IIMProgressMonitor;
import org.tizen.installmanager.lib.Log;
while ((readByte = zipInStream.read(zipBuf)) >= 0) {
zipOutput.write(zipBuf, 0, readByte);
- zipOutput.flush();
totalUnZipSize += readByte;
}
writeFileList(zipEntry.getName());
-// File outFile = new File(targetPath);
-//
-// if (outFile.isFile()
-// && (PathUtil.getFileExtension(outFile.getName())
-// .equals("") || PathUtil.getFileExtension(
-// outFile.getName()).equals("sh"))) {
-// outFile.setExecutable(true);
-// }
-
if (zipOutput != null) {
zipOutput.close();
}
} finally {
try {
if (zipOutput != null) {
+ zipOutput.flush();
zipOutput.close();
}
} catch (IOException e) {