Used BufferedInputStream for JseBaseLib
This commit is contained in:
@@ -21,6 +21,7 @@
|
|||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
package org.luaj.vm2.lib.jse;
|
package org.luaj.vm2.lib.jse;
|
||||||
|
|
||||||
|
import java.io.BufferedInputStream;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
@@ -106,9 +107,10 @@ public class JseBaseLib extends org.luaj.vm2.lib.BaseLib {
|
|||||||
if ( ! f.exists() )
|
if ( ! f.exists() )
|
||||||
return super.findResource(filename);
|
return super.findResource(filename);
|
||||||
try {
|
try {
|
||||||
return new FileInputStream(f);
|
return new BufferedInputStream(new FileInputStream(f));
|
||||||
} catch ( IOException ioe ) {
|
} catch ( IOException ioe ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user