Java Jar Usage process(Object obj)

Here you can find the source of process(Object obj)

Description

process

License

Apache License

Declaration

public static void process(Object obj) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.util.jar.JarEntry;

public class Main {
    public static void process(Object obj) {
        JarEntry entry = (JarEntry) obj;
        String name = entry.getName();
        long size = entry.getSize();
        long compressedSize = entry.getCompressedSize();
        System.out.println(name + "\t" + size + "\t" + compressedSize);
    }/*from ww  w .  jav a 2  s. co m*/

    public static String getName(String fileName) {
        int pos = fileName.lastIndexOf(".");
        if (pos == -1) {
            return fileName;
        } else {
            return fileName.substring(0, pos);
        }
    }
}

Related

  1. getMatchingResourcesFromJar(JarFile jarFile, String suffix)
  2. getSortedAttributes(Attributes mainAttributes)
  3. getSortedJarEntries(JarFile jarFile)
  4. isSet(Attributes attributes, String name)
  5. listFiles(JarFile jarFile, String path)
  6. processJarFile(String f)
  7. recordFactoryDefault(String className, Attributes attributes)
  8. safeClose(JarFile jf)
  9. scanJarPackageClass(List> classes, String packageDirName, String packageName, JarFile jar, boolean recursive)