Thread: Auto cache downloader is a little off

Results 1 to 4 of 4
  1. #1 Auto cache downloader is a little off 
    Donator
    Zenpex's Avatar
    Join Date
    Mar 2021
    Posts
    35
    Thanks given
    5
    Thanks received
    0
    Discord
    View profile
    Rep Power
    36
    Cache downloads..
    GUI Opens 0-100% then throws exception at unzipping it.

    (Check comments for more details)
    Last edited by Zenpex; 09-15-2021 at 04:12 AM.
    Reply With Quote  
     

  2. #2  
    Respected Member

    Join Date
    Jan 2009
    Posts
    5,690
    Thanks given
    1,105
    Thanks received
    3,510
    Discord
    View profile
    Rep Power
    5000
    Can you post the full exception?
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Nov 2020
    Posts
    1
    Thanks given
    0
    Thanks received
    0
    Rep Power
    0
    If you post the full code i may can help you.
    Reply With Quote  
     

  4. #4  
    Donator
    Zenpex's Avatar
    Join Date
    Mar 2021
    Posts
    35
    Thanks given
    5
    Thanks received
    0
    Discord
    View profile
    Rep Power
    36
    Quote Originally Posted by Spock View Post
    Can you post the full exception?


    The cache downloads, the GUI pops up, downloads 0-100%, goes to unzip at the end, and throws that exception

    Spoiler for Breaking Point Method (I think):
    private void unZipFile(File zipFile, File outFile) throws IOException {
    g.setStatus("Unzipping InsightPSCache...");
    g.setPercent(0);

    ZipInputStream zin = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));

    ZipEntry e;

    long max = 0;
    long curr = 0;

    while ((e = zin.getNextEntry()) != null) {
    max += e.getSize();
    }

    zin.close();

    ZipInputStream in = new ZipInputStream(new BufferedInputStream(new FileInputStream(zipFile)));

    while ((e = in.getNextEntry()) != null) {
    if (e.isDirectory()) {
    new File(outFile, e.getName()).mkdirs();
    } else {
    FileOutputStream out = new FileOutputStream(new File(outFile, e.getName()));

    byte[] b = new byte[1024];

    int len;

    while ((len = in.read(b, 0, b.length)) > -1) {
    curr += len;
    out.write(b, 0, len);
    g.setPercent((int) ((curr * 100) / max));
    }

    out.flush();
    out.close();
    }
    }

    in.close();
    }


    Also:
    The part that downloads, load1 load2 load3 (all old client loading pictures), cache version txt file, maincachefile.dat and .idxs, and alongside all that is the cache it uses but its staying zipped.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 08-27-2015, 03:36 PM
  2. Auto Cache Downloading
    By James in forum Tutorials
    Replies: 113
    Last Post: 09-27-2008, 04:25 PM
  3. Auto Cache Downloading (Here's how!)
    By Ninja Cat in forum Tutorials
    Replies: 22
    Last Post: 03-11-2008, 02:50 PM
  4. Auto Cache download?
    By Eportal in forum Tutorials
    Replies: 4
    Last Post: 10-07-2007, 06:34 PM
  5. Buying Auto cache downloading webclient
    By wildy in forum RS2 Client
    Replies: 2
    Last Post: 08-24-2007, 03:40 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •