project: Rev 202

This commit is contained in:
Owain van Brakel
2021-12-14 18:20:58 +01:00
parent e974585ce8
commit 7c7bf0901a
406 changed files with 39725 additions and 39842 deletions

View File

@@ -31,32 +31,32 @@ public final class AccessFile {
long offset;
public AccessFile(File var1, String var2, long var3) throws IOException {
if (-1L == var3) { // L: 11
if (-1L == var3) {
var3 = Long.MAX_VALUE;
}
if (var1.length() > var3) { // L: 12
var1.delete(); // L: 13
if (var1.length() > var3) {
var1.delete();
}
this.file = new RandomAccessFile(var1, var2); // L: 15
this.maxSize = var3; // L: 16
this.offset = 0L; // L: 17
int var5 = this.file.read(); // L: 18
if (var5 != -1 && !var2.equals("r")) { // L: 19
this.file.seek(0L); // L: 20
this.file.write(var5); // L: 21
this.file = new RandomAccessFile(var1, var2);
this.maxSize = var3;
this.offset = 0L;
int var5 = this.file.read();
if (var5 != -1 && !var2.equals("r")) {
this.file.seek(0L);
this.file.write(var5);
}
this.file.seek(0L); // L: 23
} // L: 24
this.file.seek(0L);
}
@ObfuscatedName("c")
@Export("seek")
final void seek(long var1) throws IOException {
this.file.seek(var1); // L: 27
this.offset = var1; // L: 28
} // L: 29
this.file.seek(var1);
this.offset = var1;
}
@ObfuscatedName("b")
@ObfuscatedSignature(
@@ -65,7 +65,7 @@ public final class AccessFile {
)
@Export("write")
public final void write(byte[] var1, int var2, int var3) throws IOException {
if (this.offset + (long)var3 > this.maxSize) { // L: 32
if (this.offset + (long)var3 > this.maxSize) {
this.file.seek(this.maxSize);
this.file.write(1);
throw new EOFException();
@@ -95,16 +95,16 @@ public final class AccessFile {
if (this.file != null) {
if (var1) {
try {
this.file.getFD().sync(); // L: 49
this.file.getFD().sync();
} catch (SyncFailedException var3) {
}
}
this.file.close(); // L: 53
this.file = null; // L: 54
this.file.close();
this.file = null;
}
} // L: 56
}
@ObfuscatedName("t")
@ObfuscatedSignature(
@@ -113,7 +113,7 @@ public final class AccessFile {
)
@Export("length")
public final long length() throws IOException {
return this.file.length(); // L: 59
return this.file.length();
}
@ObfuscatedName("s")
@@ -123,21 +123,21 @@ public final class AccessFile {
)
@Export("read")
public final int read(byte[] var1, int var2, int var3) throws IOException {
int var4 = this.file.read(var1, var2, var3); // L: 63
int var4 = this.file.read(var1, var2, var3);
if (var4 > 0) {
this.offset += (long)var4; // L: 64
this.offset += (long)var4;
}
return var4; // L: 65
return var4;
}
protected void finalize() throws Throwable {
if (this.file != null) { // L: 69
System.out.println(""); // L: 70
this.close(); // L: 71
if (this.file != null) {
System.out.println("");
this.close();
}
} // L: 73
}
@ObfuscatedName("c")
@ObfuscatedSignature(
@@ -150,13 +150,13 @@ public final class AccessFile {
var1.printStackTrace();
} else {
try {
String var2 = ""; // L: 33
if (var1 != null) { // L: 34
String var2 = "";
if (var1 != null) {
var2 = IgnoreList.method6267(var1);
}
if (var0 != null) { // L: 35
if (var1 != null) { // L: 36
if (var0 != null) {
if (var1 != null) {
var2 = var2 + " | ";
}
@@ -172,15 +172,15 @@ public final class AccessFile {
return;
}
URL var3 = new URL(RunException.RunException_applet.getCodeBase(), "clienterror.ws?c=" + RunException.RunException_revision + "&u=" + RunException.localPlayerName + "&v1=" + TaskHandler.javaVendor + "&v2=" + NPC.javaVersion + "&ct=" + class398.clientType + "&e=" + var2); // L: 45
DataInputStream var4 = new DataInputStream(var3.openStream()); // L: 46
var4.read(); // L: 47
var4.close(); // L: 48
} catch (Exception var5) { // L: 50
URL var3 = new URL(RunException.RunException_applet.getCodeBase(), "clienterror.ws?c=" + RunException.RunException_revision + "&u=" + RunException.localPlayerName + "&v1=" + TaskHandler.javaVendor + "&v2=" + NPC.javaVersion + "&ct=" + class398.clientType + "&e=" + var2);
DataInputStream var4 = new DataInputStream(var3.openStream());
var4.read();
var4.close();
} catch (Exception var5) {
}
}
} // L: 51
}
@ObfuscatedName("b")
@ObfuscatedSignature(
@@ -189,19 +189,19 @@ public final class AccessFile {
)
@Export("SpotAnimationDefinition_get")
public static SpotAnimationDefinition SpotAnimationDefinition_get(int var0) {
SpotAnimationDefinition var1 = (SpotAnimationDefinition)SpotAnimationDefinition.SpotAnimationDefinition_cached.get((long)var0); // L: 37
if (var1 != null) { // L: 38
SpotAnimationDefinition var1 = (SpotAnimationDefinition)SpotAnimationDefinition.SpotAnimationDefinition_cached.get((long)var0);
if (var1 != null) {
return var1;
} else {
byte[] var2 = SpotAnimationDefinition.SpotAnimationDefinition_archive.takeFile(13, var0); // L: 39
var1 = new SpotAnimationDefinition(); // L: 40
var1.id = var0; // L: 41
if (var2 != null) { // L: 42
byte[] var2 = SpotAnimationDefinition.SpotAnimationDefinition_archive.takeFile(13, var0);
var1 = new SpotAnimationDefinition();
var1.id = var0;
if (var2 != null) {
var1.decode(new Buffer(var2));
}
SpotAnimationDefinition.SpotAnimationDefinition_cached.put(var1, (long)var0); // L: 43
return var1; // L: 44
SpotAnimationDefinition.SpotAnimationDefinition_cached.put(var1, (long)var0);
return var1;
}
}
}