Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class InstallWizard {
- InputStream data;
- public static void main (String[] args) {
- String path = "http://maven.lx01.com/lx01/projects/stoneagesurvivalstuff/sass-files.modern.zip";
- File file = getArchDir();
- if (args.length >= 1 && validURL(args[0])) path = args[0];
- if (args.length >= 2 && validFile(args[1])) file = args[1];
- new InstallWizard().get(path).install(file);
- }
- public InstallWizard () {}
- public InstallWizard get (path) {
- this.data = new URL(path).openConnection().getInputStream();
- return this;
- }
- public void install (File path) {
- ZipInputStream zip = new ZipInputStream(this.data);
- ArrayList<Byte> entry = new ArrayList<Byte>();
- while (true) {
- if (zip.getNextEntry() != null && zip.getNextEntry().getName() == "pointers.json") {
- while (zip.available() >= 1) {
- entry.add(Byte.valueOf(zip.read()));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement