Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. import java.io.BufferedInputStream;import java.io.FileInputStream;import java.io.IOException;import java.util.ArrayList;import java.util.Enumeration;import java.util.jar.JarEntry;import java.util.jar.JarFile;import java.io.FileNotFoundException;import java.util.jar.JarInputStream;import java.util.zip.ZipEntry;import java.util.zip.ZipInputStream;public class a{ public static void main(String[] args) throws IOException, FileNotFoundException { System.out.println('a'); JarFile t = new JarFile("C:\\Users\\galbraithja\\Desktop\\.git\\Test\\src\\test.jar"); ArrayList<JarEntry> classes = new ArrayList<JarEntry>(); JarEntry e = new JarEntry("C:\\Users\\galbraithja\\Desktop\\.git\\Test\\src\\test.jar"); System.out.println(t.toString() +" , " + e.toString()); System.out.println('c'); Enumeration<JarEntry> c = t.entries(); c.nextElement(); c.nextElement(); int f=0; while (c.hasMoreElements()) { classes.add(c.nextElement()); System.out.println(classes.get(f)); f++; //System.out.println(c.nextElement().toString()); } FileInputStream fis=new FileInputStream("C:\\Users\\galbraithja\\Desktop\\.git\\Test\\src\\test.jar"); BufferedInputStream bis=new BufferedInputStream(fis); JarInputStream zis=new JarInputStream(bis); JarEntry ze=null; ArrayList<byte[]> bytes = new ArrayList<byte[]>(); while((ze=zis.getNextJarEntry())!=null){ bytes.add(new byte[(int)ze.getSize()]); } }}
  2.  
  3.  
  4.  
  5. a
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement