/** * Returns a stream to a pack, depending on the installation kind. * * @param n The pack number. * @return The stream. * @exception Exception Description of the Exception */ private InputStream getPackAsStream(int n) throws Exception { InputStream in = null; if (idata.kind.equalsIgnoreCase("standard") || idata.kind.equalsIgnoreCase("standard-kunststoff")) in = getClass().getResourceAsStream("/packs/pack" + n); else if (idata.kind.equalsIgnoreCase("web") || idata.kind.equalsIgnoreCase("web-kunststoff")) { URL url = new URL("jar:" + jarLocation + "!/packs/pack" + n); JarURLConnection jarConnection = (JarURLConnection) url.openConnection(); in = jarConnection.getInputStream(); } return in; }