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

Reviewed-by: emcmanus
This commit is contained in:
Shanliang Jiang 2008-12-09 17:41:04 +01:00
parent e936f852bf
commit 34982c7509

View File

@ -1165,9 +1165,10 @@ public class MLet extends java.net.URLClassLoader
file.deleteOnExit();
FileOutputStream fileOutput = new FileOutputStream(file);
try {
int c;
while ((c = is.read()) != -1) {
fileOutput.write(c);
byte[] buf = new byte[4096];
int n;
while ((n = is.read(buf)) >= 0) {
fileOutput.write(buf, 0, n);
}
} finally {
fileOutput.close();