Unpacker ( )源码实例Demo

java.util.jar.Pack200#Unpacker ( )源码实例Demo

下面列出了java.util.jar.Pack200#Unpacker ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: dragonwell8_jdk   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码2 项目: TencentKona-8   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码3 项目: jdk8u60   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码4 项目: openjdk-jdk8u   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码5 项目: openjdk-jdk8u-backup   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码6 项目: openjdk-jdk9   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码7 项目: jdk8u-jdk   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码8 项目: hottub   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码9 项目: openjdk-8-source   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码10 项目: openjdk-8   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码11 项目: jdk8u_jdk   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码12 项目: jdk8u-jdk   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码13 项目: jdk8u-dev-jdk   文件: Utils.java
private static void unpack0(File inFile, JarOutputStream jarStream,
        boolean useJavaUnpack) throws IOException {
    // Unpack the files
    Pack200.Unpacker unpacker = Pack200.newUnpacker();
    Map<String, String> props = unpacker.properties();
    if (useJavaUnpack) {
        props.put("com.sun.java.util.jar.pack.disable.native", "true");
    }
    // Call the unpacker
    unpacker.unpack(inFile, jarStream);
}
 
源代码14 项目: Spark   文件: Startup.java
/**
 * Converts any pack files in a directory into standard JAR files. Each
 * pack file will be deleted after being converted to a JAR. If no
 * pack files are found, this method does nothing.
 *
 * @param libDir      the directory containing pack files.
 * @param printStatus true if status ellipses should be printed when unpacking.
 */
private void unpackArchives(File libDir, boolean printStatus) {
    // Get a list of all packed files in the lib directory.
    File[] packedFiles = libDir.listFiles( ( dir, name ) -> {
        return name.endsWith(".pack");
    } );

    if (packedFiles == null) {
        // Do nothing since no .pack files were found
        return;
    }

    // Unpack each.
    boolean unpacked = false;
    for (File packedFile : packedFiles) {
        try {
            String jarName = packedFile.getName().substring(0,
                packedFile.getName().length() - ".pack".length());
            // Delete JAR file with same name if it exists (could be due to upgrade
            // from old Wildfire release).
            File jarFile = new File(libDir, jarName);
            if (jarFile.exists()) {
                jarFile.delete();
            }

            InputStream in = new BufferedInputStream(new FileInputStream(packedFile));
            JarOutputStream out = new JarOutputStream(new BufferedOutputStream(
                new FileOutputStream(new File(libDir, jarName))));
            Pack200.Unpacker unpacker = Pack200.newUnpacker();
            // Print something so the user knows something is happening.
            if (printStatus) {
                System.out.print(".");
            }
            // Call the unpacker
            unpacker.unpack(in, out);

            in.close();
            out.close();
            packedFile.delete();
            unpacked = true;
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
    // Print newline if unpacking happened.
    if (unpacked && printStatus) {
        System.out.println();
    }
}
 
源代码评论
动弹
沙发等你来抢
 方法所在类