提交 a59b3abb 编写于 作者: S sjiang

6405891: MLet: could be improved to load a native lib

Reviewed-by: emcmanus
上级 4758e0c4
...@@ -1165,9 +1165,10 @@ public class MLet extends java.net.URLClassLoader ...@@ -1165,9 +1165,10 @@ public class MLet extends java.net.URLClassLoader
file.deleteOnExit(); file.deleteOnExit();
FileOutputStream fileOutput = new FileOutputStream(file); FileOutputStream fileOutput = new FileOutputStream(file);
try { try {
int c; byte[] buf = new byte[4096];
while ((c = is.read()) != -1) { int n;
fileOutput.write(c); while ((n = is.read(buf)) >= 0) {
fileOutput.write(buf, 0, n);
} }
} finally { } finally {
fileOutput.close(); fileOutput.close();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册