Examples of JarResources


Examples of nz.govt.natlib.meta.config.JarResources

          "Installing " + adapter);

      File jarFile = new File(jarName);
      // Get other xslt/xml/xsd/dtd stuff
      Iterator it = dlg.getXmlFiles();
      JarResources jarRes = new JarResources(jarFile.getAbsolutePath());
      while (it.hasNext()) {
        String xmlFile = (String) it.next();
        LogManager.getInstance().logMessage(LogMessage.INFO,
            "Installing " + xmlFile + " in xml directory");
        byte[] res = jarRes.getResource(xmlFile);
        File newRes = new File(Config.getInstance().getXMLBaseURL(),
            new File(xmlFile).getName());
        try {
          if (newRes.createNewFile()) {
            FileOutputStream fos = new FileOutputStream(newRes);
View Full Code Here

Examples of nz.govt.natlib.meta.config.JarResources

      mapSet.put(maps[i].getXsltFunction(), maps[i]);
    }
    String jar = Config.getEditInstance().getJarForAdapter(adapter);
    if (jar != null) {
      File jarFile = new File(Config.getInstance().getJarBaseURL(), jar);
      JarResources jarRes = new JarResources(jarFile.getAbsolutePath());
      Set jarFiles = jarRes.listContents();
      Iterator it = jarFiles.iterator();
      while (it.hasNext()) {
        String fileName = (String) it.next();
        if (fileName.endsWith(".xslt") || fileName.endsWith(".dtd")
            || fileName.endsWith(".xml")
View Full Code Here

Examples of nz.govt.natlib.meta.config.JarResources

    }

    private void analyseTHIS() {
      adapterTxt.setText("Analysing...");
      adapterTxt.setForeground(Color.BLUE);
      JarResources jar = new JarResources(jarNameTxt.getText());
      Set contents = jar.listContents();
      Iterator it = contents.iterator();
      xmlFiles = new ArrayList();
      adapterClass = null;
      Loader miniLoader = new Loader();
      while (it.hasNext()) {
        String path = (String) it.next();
        if (path.endsWith(".class")) {
          if (adapterClass == null) {
            String className = path.substring(0,
                path.indexOf(".class")).replace('/', '.');
            byte[] classBytes = null;
            classBytes = jar.getResource(path);
            if (classBytes != null) {
              Class cl = null;
              try {
                cl = miniLoader.returnClass(className,
                    classBytes, 0, classBytes.length);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.