public RegionFileChunkBuffer(RegionFile regionfile, int i, int j) : base(8096) { field_22157_a = regionfile; field_22156_b = i; field_22158_c = j; }
private void func_22107_a(File file, ArrayList arraylist, int i, int j, IProgressUpdate iprogressupdate) { Collections.sort(arraylist); var abyte0 = new byte[4096]; int i1; for (Iterator iterator = arraylist.iterator(); iterator.hasNext(); iprogressupdate.setLoadingProgress(i1)) { var filematcher = (FileMatcher)iterator.next(); int k = filematcher.func_22205_b(); int l = filematcher.func_22204_c(); RegionFile regionfile = RegionFileCache.func_22123_a(file, k, l); if (!regionfile.isChunkSaved(k & 0x1f, l & 0x1f)) { try { var datainputstream = new DataInputStream(new GZIPInputStream(new FileInputStream(filematcher.func_22207_a()))); DataOutputStream dataoutputstream = regionfile.getChunkDataOutputStream(k & 0x1f, l & 0x1f); for (int j1 = 0; (j1 = datainputstream.read(abyte0)) != -1;) { dataoutputstream.write(abyte0, 0, j1); } dataoutputstream.close(); datainputstream.close(); } catch (IOException ioexception) { ioexception.printStackTrace(); } } i++; i1 = (int)Math.round((100D * i) / j); } RegionFileCache.func_22122_a(); }
public static DataOutputStream func_22120_d(File file, int i, int j) { RegionFile regionfile = func_22123_a(file, i, j); return(regionfile.getChunkDataOutputStream(i & 0x1f, j & 0x1f)); }
public static int func_22121_b(File file, int i, int j) { RegionFile regionfile = func_22123_a(file, i, j); return(regionfile.getSizeDelta()); }