/** Load the content form an input stream as a binary chunk or text file. * @param is InputStream containing a lua script or compiled lua" * @param chunkname Name that will be used within the chunk as the source. * @param mode String containing 'b' or 't' or both to control loading as binary or text or either. * @param environment LuaTable to be used as the environment for the loaded function. * */ public LuaValue load(InputStream is, String chunkname, String mode, LuaValue environment) { try { Prototype p = loadPrototype(is, chunkname, mode); return loader.load(p, chunkname, environment); } catch (LuaError l) { throw l; } catch (Exception e) { return error("load "+chunkname+": "+e); } }
/** Load the content form an input stream as a binary chunk or text file. * @param is InputStream containing a lua script or compiled lua" * @param chunkname Name that will be used within the chunk as the source. * @param mode String containing 'b' or 't' or both to control loading as binary or text or either. * @param environment LuaTable to be used as the environment for the loaded function. * */ public LuaValue load(InputStream is, String chunkname, String mode, LuaValue environment) { try { Prototype p = loadPrototype(is, chunkname, mode); return loader.load(p, chunkname, environment); } catch (LuaError l) { throw l; } catch (Exception e) { return error("load "+chunkname+": "+e); } }
binary = mGlobals.loadPrototype(streamFile, name, "b");
binary = global.loadPrototype(streamFile, name, "b");