-
- private static synchronized byte[] getImage() throws IOException {
- if (image == null)
- image = InputStreamToByteArray.convert(Main.builtin.getInputStream("libmspack.mips"));
- return image;
- }
-
- public MSPack(InputStream cabIS) throws IOException {
- byte[] cab = InputStreamToByteArray.convert(cabIS);
- Interpreter vm = new Interpreter(getImage());
-
- int cabAddr = vm.sbrk(cab.length);
- if(cabAddr < 0) throw new MSPackException("sbrk failed");