X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2FRes.java;h=01856f295abebb4347dac5b35dac89f6358a55e6;hb=907508ecbe43f28f14cf773b3b5d8a7a977d9c67;hp=862b12df4ebcb692d4b31b5741bdf5484beffe0e;hpb=574af437a07d0e80428923a4004f3d7c1b1be7e2;p=org.ibex.core.git diff --git a/src/org/xwt/Res.java b/src/org/xwt/Res.java index 862b12d..01856f2 100644 --- a/src/org/xwt/Res.java +++ b/src/org/xwt/Res.java @@ -173,7 +173,7 @@ public abstract class Res extends JS { return ((i & 0xff) << 24) | ((i & 0xff00) << 8) | ((i & 0xff0000) >>> 8) | (i >>> 24); } public InputStream getInputStream(String path) throws IOException { - InputStream is = parent.getInputStream(); + /* InputStream is = parent.getInputStream(); byte[] scan = new byte[4]; int ofs = 0; for(int i=0; i<2; i++) { @@ -189,6 +189,14 @@ public abstract class Res extends JS { } Log.log(this, "found MSCF header at offset " + ofs); return org.xwt.util.CAB.getFileInputStream(is, path, true); + */ + try { + return org.xwt.util.CAB.getFileInputStream(is, 2, path); + } catch (EOFException eof) { + throw new JS.Exn("MSCF header tag not found in file"); + } catch (EOFException eof) { + throw new JS.Exn("IOException while reading file"); + } } }