Advertisement
SforzandoCF

i

Apr 12th, 2024
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.04 KB | None | 0 0
  1. public class InstallWizard {
  2.     InputStream data;
  3.    
  4.     public static void main (String[] args) {
  5.         String path = "http://maven.lx01.com/lx01/projects/stoneagesurvivalstuff/sass-files.modern.zip";
  6.         File file = getArchDir();
  7.         if (args.length >= 1 && validURL(args[0])) path = args[0];
  8.         if (args.length >= 2 && validFile(args[1])) file = args[1];
  9.         new InstallWizard().get(path).install(file);
  10.     }
  11.    
  12.     public InstallWizard () {}
  13.    
  14.     public InstallWizard get (path) {
  15.         this.data = new URL(path).openConnection().getInputStream();
  16.         return this;
  17.     }
  18.    
  19.     public void install (File path) {
  20.         ZipInputStream zip = new ZipInputStream(this.data);
  21.         ArrayList<Byte> entry = new ArrayList<Byte>();
  22.         while (true) {
  23.             if (zip.getNextEntry() != null && zip.getNextEntry().getName() == "pointers.json") {
  24.                 while (zip.available() >= 1) {
  25.                     entry.add(Byte.valueOf(zip.read()));
  26.                 }
  27.             }
  28.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement