Package org.voltdb.utils

Examples of org.voltdb.utils.JarReader


     * @throws Exception (VoltCompilerException DNE?)
     */
    public static void updateCatalogInJar(File jarFileName, Catalog catalog, File...additions) throws Exception {
        catalog.serialize();
        // Read the old jar file into memory with JarReader.
        JarReader reader = new JarReader(jarFileName.getAbsolutePath());
        List<String> files = reader.getContentsFromJarfile();
        ArrayList<byte[]> bytes = new ArrayList<byte[]>();
        for (String file : files) {
            bytes.add(JarReader.readFileFromJarAtURL(jarFileName.getAbsolutePath(), file));
        }
       
View Full Code Here


            }
           
            // HACK: Extract the ParameterMappings embedded in jar and write them to a temp file
            // This is terrible, confusing, and a total mess...
            // I have no one to blame but myself...
            JarReader reader = new JarReader(jar_file.getAbsolutePath());
            for (String file : reader.getContentsFromJarfile()) {
                if (file.endsWith(".mappings")) {
                    String contents = new String(JarReader.readFileFromJarAtURL(jar_file.getAbsolutePath(), file));
                    File copy = FileUtil.writeStringToTempFile(contents, "mappings", true);
                    this.params.put(PARAM_MAPPINGS, copy.toString());
                    break;
View Full Code Here

TOP

Related Classes of org.voltdb.utils.JarReader

Copyright © 2018 www.massapicom. 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.