类java.util.jar.Pack200源码实例Demo

下面列出了怎么用java.util.jar.Pack200的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: jdk8u-jdk   文件: NativeUnpack.java
private void updateProgress() {
    // Progress is a combination of segment reading and file writing.
    final double READ_WT  = 0.33;
    final double WRITE_WT = 0.67;
    double readProgress = _segCount;
    if (_estByteLimit > 0 && _byteCount > 0)
        readProgress += (double)_byteCount / _estByteLimit;
    double writeProgress = _fileCount;
    double scaledProgress
        = READ_WT  * readProgress  / Math.max(_estSegLimit,1)
        + WRITE_WT * writeProgress / Math.max(_estFileLimit,1);
    int percent = (int) Math.round(100*scaledProgress);
    if (percent > 100)  percent = 100;
    if (percent > _prevPercent) {
        _prevPercent = percent;
        _props.setInteger(Pack200.Unpacker.PROGRESS, percent);
        if (_verbose > 0)
            Utils.log.info("progress = "+percent);
    }
}
 
源代码2 项目: dragonwell8_jdk   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 *
 * @param in  a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);

    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码3 项目: dragonwell8_jdk   文件: PackerImpl.java
/**
 * Takes a JarInputStream and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 * <p>
 * The modification time and deflation hint attributes are not available,
 * for the jar-manifest file and the directory containing the file.
 *
 * @see #MODIFICATION_TIME
 * @see #DEFLATION_HINT
 * @param in a JarInputStream
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarInputStream in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);
    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }
        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码4 项目: dragonwell8_jdk   文件: NativeUnpack.java
private void updateProgress() {
    // Progress is a combination of segment reading and file writing.
    final double READ_WT  = 0.33;
    final double WRITE_WT = 0.67;
    double readProgress = _segCount;
    if (_estByteLimit > 0 && _byteCount > 0)
        readProgress += (double)_byteCount / _estByteLimit;
    double writeProgress = _fileCount;
    double scaledProgress
        = READ_WT  * readProgress  / Math.max(_estSegLimit,1)
        + WRITE_WT * writeProgress / Math.max(_estFileLimit,1);
    int percent = (int) Math.round(100*scaledProgress);
    if (percent > 100)  percent = 100;
    if (percent > _prevPercent) {
        _prevPercent = percent;
        _props.setInteger(Pack200.Unpacker.PROGRESS, percent);
        if (_verbose > 0)
            Utils.log.info("progress = "+percent);
    }
}
 
源代码5 项目: TencentKona-8   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 *
 * @param in  a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);

    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码6 项目: openjdk-8   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 * @param in a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert(Utils.currentInstance.get() == null);
    TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
                  ? null
                  : TimeZone.getDefault();
    try {
        Utils.currentInstance.set(this);
        if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (tz != null) TimeZone.setDefault(tz);
        in.close();
    }
}
 
源代码7 项目: jdk8u60   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 *
 * @param in  a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);

    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码8 项目: EclipseCodeFormatter   文件: RepackJars.java
private Map<String, String> properties() {
	// Create the Packer object
	Pack200.Packer packer = Pack200.newPacker();
	Map<String, String> p = packer.properties();
	p.put(Pack200.Packer.EFFORT, "9"); // default is "5"
	p.put(Pack200.Packer.SEGMENT_LIMIT, "-1");
	p.put(Pack200.Packer.KEEP_FILE_ORDER, Pack200.Packer.FALSE);
	p.put(Pack200.Packer.MODIFICATION_TIME, Pack200.Packer.LATEST);
	p.put(Pack200.Packer.DEFLATE_HINT, Pack200.Packer.TRUE); // compression enabled
	// p.put("com.sun.java.util.jar.pack.verbose", Pack200.Packer.FALSE);
	// p.put("com.sun.java.util.jar.pack.nolog", Pack200.Packer.TRUE);
	String[] attributes = { UNKNOWN_ATTRIBUTE, CLASS_ATTRIBUTE_PFX, FIELD_ATTRIBUTE_PFX, METHOD_ATTRIBUTE_PFX,
			CODE_ATTRIBUTE_PFX, };
	String[] stripCodeAttributes = { "SourceFile", "LineNumberTable", "LocalVariableTable", "Deprecated" };
	for (String attribute : attributes) {
		for (String attributeName : stripCodeAttributes) {
			p.put(attribute + attributeName, Pack200.Packer.STRIP);
		}
	}
	p.put(Pack200.Packer.UNKNOWN_ATTRIBUTE, Pack200.Packer.STRIP);
	return p;
}
 
源代码9 项目: openjdk-8-source   文件: NativeUnpack.java
private void updateProgress() {
    // Progress is a combination of segment reading and file writing.
    final double READ_WT  = 0.33;
    final double WRITE_WT = 0.67;
    double readProgress = _segCount;
    if (_estByteLimit > 0 && _byteCount > 0)
        readProgress += (double)_byteCount / _estByteLimit;
    double writeProgress = _fileCount;
    double scaledProgress
        = READ_WT  * readProgress  / Math.max(_estSegLimit,1)
        + WRITE_WT * writeProgress / Math.max(_estFileLimit,1);
    int percent = (int) Math.round(100*scaledProgress);
    if (percent > 100)  percent = 100;
    if (percent > _prevPercent) {
        _prevPercent = percent;
        _props.setInteger(Pack200.Unpacker.PROGRESS, percent);
        if (_verbose > 0)
            Utils.log.info("progress = "+percent);
    }
}
 
源代码10 项目: hottub   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 *
 * @param in  a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);

    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码11 项目: openjdk-jdk8u   文件: PackerImpl.java
/**
 * Takes a JarInputStream and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 * <p>
 * The modification time and deflation hint attributes are not available,
 * for the jar-manifest file and the directory containing the file.
 *
 * @see #MODIFICATION_TIME
 * @see #DEFLATION_HINT
 * @param in a JarInputStream
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarInputStream in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);
    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }
        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码12 项目: jdk8u-dev-jdk   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 * @param in a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert(Utils.currentInstance.get() == null);
    TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
                  ? null
                  : TimeZone.getDefault();
    try {
        Utils.currentInstance.set(this);
        if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (tz != null) TimeZone.setDefault(tz);
        in.close();
    }
}
 
源代码13 项目: openjdk-jdk8u-backup   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 *
 * @param in  a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert (Utils.currentInstance.get() == null);

    boolean needUTC = !props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE);
    try {
        Utils.currentInstance.set(this);
        if (needUTC) {
            Utils.changeDefaultTimeZoneToUtc();
        }

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (needUTC) {
            Utils.restoreDefaultTimeZone();
        }
        in.close();
    }
}
 
源代码14 项目: jdk8u-jdk   文件: PackerImpl.java
/**
 * Takes a JarFile and converts into a pack-stream.
 * <p>
 * Closes its input but not its output.  (Pack200 archives are appendable.)
 * @param in a JarFile
 * @param out an OutputStream
 * @exception IOException if an error is encountered.
 */
public synchronized void pack(JarFile in, OutputStream out) throws IOException {
    assert(Utils.currentInstance.get() == null);
    TimeZone tz = (props.getBoolean(Utils.PACK_DEFAULT_TIMEZONE))
                  ? null
                  : TimeZone.getDefault();
    try {
        Utils.currentInstance.set(this);
        if (tz != null) TimeZone.setDefault(TimeZone.getTimeZone("UTC"));

        if ("0".equals(props.getProperty(Pack200.Packer.EFFORT))) {
            Utils.copyJarFile(in, out);
        } else {
            (new DoPack()).run(in, out);
        }
    } finally {
        Utils.currentInstance.set(null);
        if (tz != null) TimeZone.setDefault(tz);
        in.close();
    }
}
 
源代码15 项目: ramus   文件: Pack.java
/**
 * @param args
 * @throws IOException
 */
public static void main(String[] args) throws IOException {
    if (args.length != 2) {
        System.err.println("command unput-directory output-directory");
        System.exit(1);
    }

    Packer packer = Pack200.newPacker();

    Map p = packer.properties();
    p.put(Packer.EFFORT, "9");
    p.put(Packer.SEGMENT_LIMIT, "-1");
    p.put(Packer.KEEP_FILE_ORDER, Packer.FALSE);
    p.put(Packer.MODIFICATION_TIME, Packer.LATEST);
    p.put(Packer.DEFLATE_HINT, Packer.FALSE);
    p.put(Packer.CODE_ATTRIBUTE_PFX + "LineNumberTable", Packer.STRIP);
    p.put(Packer.UNKNOWN_ATTRIBUTE, Packer.ERROR);

    File inputDirectory = new File(args[0]);

    File outputDirectory = new File(args[1]);

    pack(packer, inputDirectory, outputDirectory);
}
 
源代码16 项目: openjdk-jdk9   文件: NativeUnpack.java
private void updateProgress() {
    // Progress is a combination of segment reading and file writing.
    final double READ_WT  = 0.33;
    final double WRITE_WT = 0.67;
    double readProgress = _segCount;
    if (_estByteLimit > 0 && _byteCount > 0)
        readProgress += (double)_byteCount / _estByteLimit;
    double writeProgress = _fileCount;
    double scaledProgress
        = READ_WT  * readProgress  / Math.max(_estSegLimit,1)
        + WRITE_WT * writeProgress / Math.max(_estFileLimit,1);
    int percent = (int) Math.round(100*scaledProgress);
    if (percent > 100)  percent = 100;
    if (percent > _prevPercent) {
        _prevPercent = percent;
        _props.setInteger(Pack200.Unpacker.PROGRESS, percent);
        if (_verbose > 0)
            Utils.log.info("progress = "+percent);
    }
}
 
源代码17 项目: openjdk-8-source   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码18 项目: jdk8u-jdk   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码19 项目: dragonwell8_jdk   文件: PackerImpl.java
void flushAll(OutputStream out) throws IOException {
    props.setInteger(Pack200.Packer.PROGRESS, 50);
    flushPackage(out, 0);
    out.flush();
    props.setInteger(Pack200.Packer.PROGRESS, 100);
    segmentCount += 1;
    segmentTotalSize += segmentSize;
    segmentSize = 0;
    if (verbose > 0 && segmentCount > 1) {
        Utils.log.info("Transmitted "
                         +segmentTotalSize+" input bytes in "
                         +segmentCount+" segments totaling "
                         +totalOutputSize+" bytes");
    }
}
 
源代码20 项目: dragonwell8_jdk   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码21 项目: 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);
}
 
源代码22 项目: TencentKona-8   文件: PackerImpl.java
void flushPartial(OutputStream out, int nextCount) throws IOException {
    if (pkg.files.isEmpty() && pkg.classes.isEmpty()) {
        return;  // do not flush an empty segment
    }
    flushPackage(out, Math.max(1, nextCount));
    props.setInteger(Pack200.Packer.PROGRESS, 25);
    // In case there will be another segment:
    makeNextPackage();
    segmentCount += 1;
    segmentTotalSize += segmentSize;
    segmentSize = 0;
}
 
源代码23 项目: TencentKona-8   文件: PackerImpl.java
void flushAll(OutputStream out) throws IOException {
    props.setInteger(Pack200.Packer.PROGRESS, 50);
    flushPackage(out, 0);
    out.flush();
    props.setInteger(Pack200.Packer.PROGRESS, 100);
    segmentCount += 1;
    segmentTotalSize += segmentSize;
    segmentSize = 0;
    if (verbose > 0 && segmentCount > 1) {
        Utils.log.info("Transmitted "
                         +segmentTotalSize+" input bytes in "
                         +segmentCount+" segments totaling "
                         +totalOutputSize+" bytes");
    }
}
 
源代码24 项目: jdk8u-jdk   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码25 项目: jdk8u-dev-jdk   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码26 项目: TencentKona-8   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码27 项目: 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);
}
 
源代码28 项目: hottub   文件: PackageVersionTest.java
static void verify6991164() {
    Unpacker unpacker = Pack200.newUnpacker();
    String versionStr = unpacker.toString();
    String expected = "Pack200, Vendor: " +
            System.getProperty("java.vendor") + ", Version: " +
            JAVA7_PACKAGE_MAJOR_VERSION + "." + JAVA7_PACKAGE_MINOR_VERSION;
    if (!versionStr.equals(expected)) {
        System.out.println("Expected: " + expected);
        System.out.println("Obtained: " + versionStr);
        throw new RuntimeException("did not get expected string " + expected);
    }
}
 
源代码29 项目: 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);
}
 
源代码30 项目: jdk8u60   文件: PackerImpl.java
void flushAll(OutputStream out) throws IOException {
    props.setInteger(Pack200.Packer.PROGRESS, 50);
    flushPackage(out, 0);
    out.flush();
    props.setInteger(Pack200.Packer.PROGRESS, 100);
    segmentCount += 1;
    segmentTotalSize += segmentSize;
    segmentSize = 0;
    if (verbose > 0 && segmentCount > 1) {
        Utils.log.info("Transmitted "
                         +segmentTotalSize+" input bytes in "
                         +segmentCount+" segments totaling "
                         +totalOutputSize+" bytes");
    }
}
 
 类所在包
 同包方法