rs-client/apis
This commit is contained in:
@@ -1,403 +1,409 @@
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.net.Socket;
|
||||
import net.runelite.mapping.Export;
|
||||
import net.runelite.mapping.Implements;
|
||||
import net.runelite.mapping.ObfuscatedGetter;
|
||||
import net.runelite.mapping.ObfuscatedName;
|
||||
import net.runelite.mapping.ObfuscatedSignature;
|
||||
|
||||
@ObfuscatedName("dy")
|
||||
@ObfuscatedName("mn")
|
||||
@Implements("BufferedFile")
|
||||
public class BufferedFile {
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Ldk;"
|
||||
)
|
||||
@Export("accessFile")
|
||||
AccessFile accessFile;
|
||||
@ObfuscatedName("f")
|
||||
@Export("readBuffer")
|
||||
byte[] readBuffer;
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -7773729680030815835L
|
||||
)
|
||||
long field47;
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -846810907
|
||||
)
|
||||
int field48;
|
||||
@ObfuscatedName("o")
|
||||
@Export("writeBuffer")
|
||||
byte[] writeBuffer;
|
||||
@ObfuscatedName("u")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 5249231081498323007L
|
||||
)
|
||||
long field49;
|
||||
@ObfuscatedName("g")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -1558233611
|
||||
)
|
||||
int field50;
|
||||
@ObfuscatedName("l")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -6819476051574242871L
|
||||
)
|
||||
long field51;
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -3728247331531750871L
|
||||
)
|
||||
long field52;
|
||||
@ObfuscatedName("x")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 2663146692618913943L
|
||||
)
|
||||
@Export("capacity")
|
||||
long capacity;
|
||||
@ObfuscatedName("d")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 5720856138805191881L
|
||||
)
|
||||
long field53;
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedSignature(
|
||||
signature = "Lma;"
|
||||
)
|
||||
@Export("accessFile")
|
||||
AccessFile accessFile;
|
||||
@ObfuscatedName("e")
|
||||
@Export("readBuffer")
|
||||
byte[] readBuffer;
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -5630904549833157093L
|
||||
)
|
||||
@Export("readBufferOffset")
|
||||
long readBufferOffset;
|
||||
@ObfuscatedName("k")
|
||||
@ObfuscatedGetter(
|
||||
intValue = 1225882999
|
||||
)
|
||||
@Export("readBufferLength")
|
||||
int readBufferLength;
|
||||
@ObfuscatedName("l")
|
||||
@Export("writeBuffer")
|
||||
byte[] writeBuffer;
|
||||
@ObfuscatedName("b")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 225596692322175817L
|
||||
)
|
||||
@Export("writeBufferOffset")
|
||||
long writeBufferOffset;
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedGetter(
|
||||
intValue = -299149629
|
||||
)
|
||||
@Export("writeBufferLength")
|
||||
int writeBufferLength;
|
||||
@ObfuscatedName("c")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -8683938208221515491L
|
||||
)
|
||||
@Export("offset")
|
||||
long offset;
|
||||
@ObfuscatedName("f")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 6190164439722426599L
|
||||
)
|
||||
@Export("fileLength")
|
||||
long fileLength;
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedGetter(
|
||||
longValue = 6621326623419959019L
|
||||
)
|
||||
@Export("length")
|
||||
long length;
|
||||
@ObfuscatedName("u")
|
||||
@ObfuscatedGetter(
|
||||
longValue = -8187358352341044117L
|
||||
)
|
||||
@Export("fileOffset")
|
||||
long fileOffset;
|
||||
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Ldk;II)V"
|
||||
)
|
||||
public BufferedFile(AccessFile var1, int var2, int var3) throws IOException {
|
||||
this.field47 = -1L;
|
||||
this.field49 = -1L;
|
||||
this.field50 = 0;
|
||||
this.accessFile = var1;
|
||||
this.capacity = this.field52 = var1.length();
|
||||
this.readBuffer = new byte[var2];
|
||||
this.writeBuffer = new byte[var3];
|
||||
this.field51 = 0L;
|
||||
}
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Lma;II)V"
|
||||
)
|
||||
public BufferedFile(AccessFile var1, int var2, int var3) throws IOException {
|
||||
this.readBufferOffset = -1L;
|
||||
this.writeBufferOffset = -1L;
|
||||
this.writeBufferLength = 0;
|
||||
this.accessFile = var1;
|
||||
this.length = this.fileLength = var1.length();
|
||||
this.readBuffer = new byte[var2];
|
||||
this.writeBuffer = new byte[var3];
|
||||
this.offset = 0L;
|
||||
}
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "-1424469113"
|
||||
)
|
||||
@Export("close")
|
||||
public void close() throws IOException {
|
||||
this.flush();
|
||||
this.accessFile.close();
|
||||
}
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(B)V",
|
||||
garbageValue = "41"
|
||||
)
|
||||
@Export("close")
|
||||
public void close() throws IOException {
|
||||
this.flush();
|
||||
this.accessFile.close();
|
||||
}
|
||||
|
||||
@ObfuscatedName("f")
|
||||
@Export("seek")
|
||||
public void seek(long index) throws IOException {
|
||||
if (index < 0L) {
|
||||
throw new IOException("");
|
||||
} else {
|
||||
this.field51 = index;
|
||||
}
|
||||
}
|
||||
@ObfuscatedName("w")
|
||||
@Export("seek")
|
||||
public void seek(long var1) throws IOException {
|
||||
if (var1 < 0L) {
|
||||
throw new IOException("");
|
||||
} else {
|
||||
this.offset = var1;
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("q")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(B)J",
|
||||
garbageValue = "0"
|
||||
)
|
||||
@Export("length")
|
||||
public long length() {
|
||||
return this.capacity;
|
||||
}
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(S)J",
|
||||
garbageValue = "21690"
|
||||
)
|
||||
@Export("length")
|
||||
public long length() {
|
||||
return this.length;
|
||||
}
|
||||
|
||||
@ObfuscatedName("w")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([BI)V",
|
||||
garbageValue = "617965847"
|
||||
)
|
||||
@Export("readFill")
|
||||
public void readFill(byte[] dst) throws IOException {
|
||||
this.read(dst, 0, dst.length);
|
||||
}
|
||||
@ObfuscatedName("p")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([BI)V",
|
||||
garbageValue = "-981743247"
|
||||
)
|
||||
@Export("readFully")
|
||||
public void readFully(byte[] var1) throws IOException {
|
||||
this.read(var1, 0, var1.length);
|
||||
}
|
||||
|
||||
@ObfuscatedName("o")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([BIIB)V",
|
||||
garbageValue = "-35"
|
||||
)
|
||||
@Export("read")
|
||||
public void read(byte[] dst, int dstIndex, int length) throws IOException {
|
||||
try {
|
||||
if (length + dstIndex > dst.length) {
|
||||
throw new ArrayIndexOutOfBoundsException(length + dstIndex - dst.length);
|
||||
}
|
||||
@ObfuscatedName("k")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([BIII)V",
|
||||
garbageValue = "1308534455"
|
||||
)
|
||||
@Export("read")
|
||||
public void read(byte[] var1, int var2, int var3) throws IOException {
|
||||
try {
|
||||
if (var3 + var2 > var1.length) {
|
||||
throw new ArrayIndexOutOfBoundsException(var3 + var2 - var1.length);
|
||||
}
|
||||
|
||||
if (-1L != this.field49 && this.field51 >= this.field49 && this.field51 + (long)length <= this.field49 + (long)this.field50) {
|
||||
System.arraycopy(this.writeBuffer, (int)(this.field51 - this.field49), dst, dstIndex, length);
|
||||
this.field51 += (long)length;
|
||||
return;
|
||||
}
|
||||
if (-1L != this.writeBufferOffset && this.offset >= this.writeBufferOffset && this.offset + (long)var3 <= this.writeBufferOffset + (long)this.writeBufferLength) {
|
||||
System.arraycopy(this.writeBuffer, (int)(this.offset - this.writeBufferOffset), var1, var2, var3);
|
||||
this.offset += (long)var3;
|
||||
return;
|
||||
}
|
||||
|
||||
long var4 = this.field51;
|
||||
int var6 = length;
|
||||
int var7;
|
||||
if (this.field51 >= this.field47 && this.field51 < this.field47 + (long)this.field48) {
|
||||
var7 = (int)((long)this.field48 - (this.field51 - this.field47));
|
||||
if (var7 > length) {
|
||||
var7 = length;
|
||||
}
|
||||
long var4 = this.offset;
|
||||
int var7 = var3;
|
||||
int var8;
|
||||
if (this.offset >= this.readBufferOffset && this.offset < this.readBufferOffset + (long)this.readBufferLength) {
|
||||
var8 = (int)((long)this.readBufferLength - (this.offset - this.readBufferOffset));
|
||||
if (var8 > var3) {
|
||||
var8 = var3;
|
||||
}
|
||||
|
||||
System.arraycopy(this.readBuffer, (int)(this.field51 - this.field47), dst, dstIndex, var7);
|
||||
this.field51 += (long)var7;
|
||||
dstIndex += var7;
|
||||
length -= var7;
|
||||
}
|
||||
System.arraycopy(this.readBuffer, (int)(this.offset - this.readBufferOffset), var1, var2, var8);
|
||||
this.offset += (long)var8;
|
||||
var2 += var8;
|
||||
var3 -= var8;
|
||||
}
|
||||
|
||||
if (length > this.readBuffer.length) {
|
||||
this.accessFile.seek(this.field51);
|
||||
if (var3 > this.readBuffer.length) {
|
||||
this.accessFile.seek(this.offset);
|
||||
|
||||
for (this.field53 = this.field51; length > 0; length -= var7) {
|
||||
var7 = this.accessFile.read(dst, dstIndex, length);
|
||||
if (var7 == -1) {
|
||||
break;
|
||||
}
|
||||
for (this.fileOffset = this.offset; var3 > 0; var3 -= var8) {
|
||||
var8 = this.accessFile.read(var1, var2, var3);
|
||||
if (var8 == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
this.field53 += (long)var7;
|
||||
this.field51 += (long)var7;
|
||||
dstIndex += var7;
|
||||
}
|
||||
} else if (length > 0) {
|
||||
this.load();
|
||||
var7 = length;
|
||||
if (length > this.field48) {
|
||||
var7 = this.field48;
|
||||
}
|
||||
this.fileOffset += (long)var8;
|
||||
this.offset += (long)var8;
|
||||
var2 += var8;
|
||||
}
|
||||
} else if (var3 > 0) {
|
||||
this.load();
|
||||
var8 = var3;
|
||||
if (var3 > this.readBufferLength) {
|
||||
var8 = this.readBufferLength;
|
||||
}
|
||||
|
||||
System.arraycopy(this.readBuffer, 0, dst, dstIndex, var7);
|
||||
dstIndex += var7;
|
||||
length -= var7;
|
||||
this.field51 += (long)var7;
|
||||
}
|
||||
System.arraycopy(this.readBuffer, 0, var1, var2, var8);
|
||||
var2 += var8;
|
||||
var3 -= var8;
|
||||
this.offset += (long)var8;
|
||||
}
|
||||
|
||||
if (-1L != this.field49) {
|
||||
if (this.field49 > this.field51 && length > 0) {
|
||||
var7 = dstIndex + (int)(this.field49 - this.field51);
|
||||
if (var7 > length + dstIndex) {
|
||||
var7 = length + dstIndex;
|
||||
}
|
||||
if (this.writeBufferOffset != -1L) {
|
||||
if (this.writeBufferOffset > this.offset && var3 > 0) {
|
||||
var8 = var2 + (int)(this.writeBufferOffset - this.offset);
|
||||
if (var8 > var3 + var2) {
|
||||
var8 = var3 + var2;
|
||||
}
|
||||
|
||||
while (dstIndex < var7) {
|
||||
dst[dstIndex++] = 0;
|
||||
--length;
|
||||
++this.field51;
|
||||
}
|
||||
}
|
||||
while (var2 < var8) {
|
||||
var1[var2++] = 0;
|
||||
--var3;
|
||||
++this.offset;
|
||||
}
|
||||
}
|
||||
|
||||
long var8 = -1L;
|
||||
long var10 = -1L;
|
||||
if (this.field49 >= var4 && this.field49 < var4 + (long)var6) {
|
||||
var8 = this.field49;
|
||||
} else if (var4 >= this.field49 && var4 < this.field49 + (long)this.field50) {
|
||||
var8 = var4;
|
||||
}
|
||||
long var13 = -1L;
|
||||
long var10 = -1L;
|
||||
if (this.writeBufferOffset >= var4 && this.writeBufferOffset < var4 + (long)var7) {
|
||||
var13 = this.writeBufferOffset;
|
||||
} else if (var4 >= this.writeBufferOffset && var4 < this.writeBufferOffset + (long)this.writeBufferLength) {
|
||||
var13 = var4;
|
||||
}
|
||||
|
||||
if ((long)this.field50 + this.field49 > var4 && this.field49 + (long)this.field50 <= var4 + (long)var6) {
|
||||
var10 = (long)this.field50 + this.field49;
|
||||
} else if ((long)var6 + var4 > this.field49 && (long)var6 + var4 <= this.field49 + (long)this.field50) {
|
||||
var10 = (long)var6 + var4;
|
||||
}
|
||||
if (this.writeBufferOffset + (long)this.writeBufferLength > var4 && this.writeBufferOffset + (long)this.writeBufferLength <= var4 + (long)var7) {
|
||||
var10 = (long)this.writeBufferLength + this.writeBufferOffset;
|
||||
} else if (var4 + (long)var7 > this.writeBufferOffset && (long)var7 + var4 <= this.writeBufferOffset + (long)this.writeBufferLength) {
|
||||
var10 = var4 + (long)var7;
|
||||
}
|
||||
|
||||
if (var8 > -1L && var10 > var8) {
|
||||
int var12 = (int)(var10 - var8);
|
||||
System.arraycopy(this.writeBuffer, (int)(var8 - this.field49), dst, (int)(var8 - var4) + dstIndex, var12);
|
||||
if (var10 > this.field51) {
|
||||
length = (int)((long)length - (var10 - this.field51));
|
||||
this.field51 = var10;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException var13) {
|
||||
this.field53 = -1L;
|
||||
throw var13;
|
||||
}
|
||||
if (var13 > -1L && var10 > var13) {
|
||||
int var12 = (int)(var10 - var13);
|
||||
System.arraycopy(this.writeBuffer, (int)(var13 - this.writeBufferOffset), var1, (int)(var13 - var4) + var2, var12);
|
||||
if (var10 > this.offset) {
|
||||
var3 = (int)((long)var3 - (var10 - this.offset));
|
||||
this.offset = var10;
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (IOException var16) {
|
||||
this.fileOffset = -1L;
|
||||
throw var16;
|
||||
}
|
||||
|
||||
if (length > 0) {
|
||||
throw new EOFException();
|
||||
}
|
||||
}
|
||||
if (var3 > 0) {
|
||||
throw new EOFException();
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("u")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "2020905321"
|
||||
)
|
||||
@Export("load")
|
||||
void load() throws IOException {
|
||||
this.field48 = 0;
|
||||
if (this.field53 != this.field51) {
|
||||
this.accessFile.seek(this.field51);
|
||||
this.field53 = this.field51;
|
||||
}
|
||||
@ObfuscatedName("l")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "-364747525"
|
||||
)
|
||||
@Export("load")
|
||||
void load() throws IOException {
|
||||
this.readBufferLength = 0;
|
||||
if (this.offset != this.fileOffset) {
|
||||
this.accessFile.seek(this.offset);
|
||||
this.fileOffset = this.offset;
|
||||
}
|
||||
|
||||
int var1;
|
||||
for (this.field47 = this.field51; this.field48 < this.readBuffer.length; this.field48 += var1) {
|
||||
var1 = this.accessFile.read(this.readBuffer, this.field48, this.readBuffer.length - this.field48);
|
||||
if (var1 == -1) {
|
||||
break;
|
||||
}
|
||||
int var2;
|
||||
for (this.readBufferOffset = this.offset; this.readBufferLength < this.readBuffer.length; this.readBufferLength += var2) {
|
||||
int var1 = this.readBuffer.length - this.readBufferLength;
|
||||
if (var1 > 200000000) {
|
||||
var1 = 200000000;
|
||||
}
|
||||
|
||||
this.field53 += (long)var1;
|
||||
}
|
||||
var2 = this.accessFile.read(this.readBuffer, this.readBufferLength, var1);
|
||||
if (var2 == -1) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
this.fileOffset += (long)var2;
|
||||
}
|
||||
|
||||
@ObfuscatedName("g")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([BIII)V",
|
||||
garbageValue = "-601174169"
|
||||
)
|
||||
@Export("write")
|
||||
public void write(byte[] src, int srcIndex, int length) throws IOException {
|
||||
try {
|
||||
if (this.field51 + (long)length > this.capacity) {
|
||||
this.capacity = this.field51 + (long)length;
|
||||
}
|
||||
}
|
||||
|
||||
if (-1L != this.field49 && (this.field51 < this.field49 || this.field51 > this.field49 + (long)this.field50)) {
|
||||
this.flush();
|
||||
}
|
||||
@ObfuscatedName("b")
|
||||
@ObfuscatedSignature(
|
||||
signature = "([BIII)V",
|
||||
garbageValue = "-1530751884"
|
||||
)
|
||||
@Export("write")
|
||||
public void write(byte[] var1, int var2, int var3) throws IOException {
|
||||
try {
|
||||
if (this.offset + (long)var3 > this.length) {
|
||||
this.length = this.offset + (long)var3;
|
||||
}
|
||||
|
||||
if (this.field49 != -1L && (long)length + this.field51 > this.field49 + (long)this.writeBuffer.length) {
|
||||
int var4 = (int)((long)this.writeBuffer.length - (this.field51 - this.field49));
|
||||
System.arraycopy(src, srcIndex, this.writeBuffer, (int)(this.field51 - this.field49), var4);
|
||||
this.field51 += (long)var4;
|
||||
srcIndex += var4;
|
||||
length -= var4;
|
||||
this.field50 = this.writeBuffer.length;
|
||||
this.flush();
|
||||
}
|
||||
if (-1L != this.writeBufferOffset && (this.offset < this.writeBufferOffset || this.offset > (long)this.writeBufferLength + this.writeBufferOffset)) {
|
||||
this.flush();
|
||||
}
|
||||
|
||||
if (length <= this.writeBuffer.length) {
|
||||
if (length > 0) {
|
||||
if (this.field49 == -1L) {
|
||||
this.field49 = this.field51;
|
||||
}
|
||||
if (this.writeBufferOffset != -1L && this.offset + (long)var3 > this.writeBufferOffset + (long)this.writeBuffer.length) {
|
||||
int var4 = (int)((long)this.writeBuffer.length - (this.offset - this.writeBufferOffset));
|
||||
System.arraycopy(var1, var2, this.writeBuffer, (int)(this.offset - this.writeBufferOffset), var4);
|
||||
this.offset += (long)var4;
|
||||
var2 += var4;
|
||||
var3 -= var4;
|
||||
this.writeBufferLength = this.writeBuffer.length;
|
||||
this.flush();
|
||||
}
|
||||
|
||||
System.arraycopy(src, srcIndex, this.writeBuffer, (int)(this.field51 - this.field49), length);
|
||||
this.field51 += (long)length;
|
||||
if (this.field51 - this.field49 > (long)this.field50) {
|
||||
this.field50 = (int)(this.field51 - this.field49);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.field53 != this.field51) {
|
||||
this.accessFile.seek(this.field51);
|
||||
this.field53 = this.field51;
|
||||
}
|
||||
if (var3 <= this.writeBuffer.length) {
|
||||
if (var3 > 0) {
|
||||
if (this.writeBufferOffset == -1L) {
|
||||
this.writeBufferOffset = this.offset;
|
||||
}
|
||||
|
||||
this.accessFile.write(src, srcIndex, length);
|
||||
this.field53 += (long)length;
|
||||
if (this.field53 > this.field52) {
|
||||
this.field52 = this.field53;
|
||||
}
|
||||
System.arraycopy(var1, var2, this.writeBuffer, (int)(this.offset - this.writeBufferOffset), var3);
|
||||
this.offset += (long)var3;
|
||||
if (this.offset - this.writeBufferOffset > (long)this.writeBufferLength) {
|
||||
this.writeBufferLength = (int)(this.offset - this.writeBufferOffset);
|
||||
}
|
||||
|
||||
long var10 = -1L;
|
||||
long var6 = -1L;
|
||||
if (this.field51 >= this.field47 && this.field51 < (long)this.field48 + this.field47) {
|
||||
var10 = this.field51;
|
||||
} else if (this.field47 >= this.field51 && this.field47 < (long)length + this.field51) {
|
||||
var10 = this.field47;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.fileOffset != this.offset) {
|
||||
this.accessFile.seek(this.offset);
|
||||
this.fileOffset = this.offset;
|
||||
}
|
||||
|
||||
if (this.field51 + (long)length > this.field47 && (long)length + this.field51 <= (long)this.field48 + this.field47) {
|
||||
var6 = this.field51 + (long)length;
|
||||
} else if ((long)this.field48 + this.field47 > this.field51 && this.field47 + (long)this.field48 <= (long)length + this.field51) {
|
||||
var6 = (long)this.field48 + this.field47;
|
||||
}
|
||||
this.accessFile.write(var1, var2, var3);
|
||||
this.fileOffset += (long)var3;
|
||||
if (this.fileOffset > this.fileLength) {
|
||||
this.fileLength = this.fileOffset;
|
||||
}
|
||||
|
||||
if (var10 > -1L && var6 > var10) {
|
||||
int var8 = (int)(var6 - var10);
|
||||
System.arraycopy(src, (int)(var10 + (long)srcIndex - this.field51), this.readBuffer, (int)(var10 - this.field47), var8);
|
||||
}
|
||||
long var9 = -1L;
|
||||
long var6 = -1L;
|
||||
if (this.offset >= this.readBufferOffset && this.offset < (long)this.readBufferLength + this.readBufferOffset) {
|
||||
var9 = this.offset;
|
||||
} else if (this.readBufferOffset >= this.offset && this.readBufferOffset < (long)var3 + this.offset) {
|
||||
var9 = this.readBufferOffset;
|
||||
}
|
||||
|
||||
this.field51 += (long)length;
|
||||
}
|
||||
if (this.offset + (long)var3 > this.readBufferOffset && this.offset + (long)var3 <= (long)this.readBufferLength + this.readBufferOffset) {
|
||||
var6 = (long)var3 + this.offset;
|
||||
} else if (this.readBufferOffset + (long)this.readBufferLength > this.offset && (long)this.readBufferLength + this.readBufferOffset <= this.offset + (long)var3) {
|
||||
var6 = (long)this.readBufferLength + this.readBufferOffset;
|
||||
}
|
||||
|
||||
} catch (IOException var9) {
|
||||
this.field53 = -1L;
|
||||
throw var9;
|
||||
}
|
||||
}
|
||||
if (var9 > -1L && var6 > var9) {
|
||||
int var8 = (int)(var6 - var9);
|
||||
System.arraycopy(var1, (int)(var9 + (long)var2 - this.offset), this.readBuffer, (int)(var9 - this.readBufferOffset), var8);
|
||||
}
|
||||
|
||||
@ObfuscatedName("l")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "-931421226"
|
||||
)
|
||||
@Export("flush")
|
||||
void flush() throws IOException {
|
||||
if (this.field49 != -1L) {
|
||||
if (this.field49 != this.field53) {
|
||||
this.accessFile.seek(this.field49);
|
||||
this.field53 = this.field49;
|
||||
}
|
||||
this.offset += (long)var3;
|
||||
}
|
||||
} catch (IOException var12) {
|
||||
this.fileOffset = -1L;
|
||||
throw var12;
|
||||
}
|
||||
}
|
||||
|
||||
this.accessFile.write(this.writeBuffer, 0, this.field50);
|
||||
this.field53 += (long)(this.field50 * 1290782301) * -1558233611L;
|
||||
if (this.field53 > this.field52) {
|
||||
this.field52 = this.field53;
|
||||
}
|
||||
@ObfuscatedName("i")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)V",
|
||||
garbageValue = "813445771"
|
||||
)
|
||||
@Export("flush")
|
||||
void flush() throws IOException {
|
||||
if (this.writeBufferOffset != -1L) {
|
||||
if (this.writeBufferOffset != this.fileOffset) {
|
||||
this.accessFile.seek(this.writeBufferOffset);
|
||||
this.fileOffset = this.writeBufferOffset;
|
||||
}
|
||||
|
||||
long var1 = -1L;
|
||||
long var3 = -1L;
|
||||
if (this.field49 >= this.field47 && this.field49 < (long)this.field48 + this.field47) {
|
||||
var1 = this.field49;
|
||||
} else if (this.field47 >= this.field49 && this.field47 < this.field49 + (long)this.field50) {
|
||||
var1 = this.field47;
|
||||
}
|
||||
this.accessFile.write(this.writeBuffer, 0, this.writeBufferLength);
|
||||
this.fileOffset += -299149629L * (long)(this.writeBufferLength * -1383888405);
|
||||
if (this.fileOffset > this.fileLength) {
|
||||
this.fileLength = this.fileOffset;
|
||||
}
|
||||
|
||||
if (this.field49 + (long)this.field50 > this.field47 && this.field49 + (long)this.field50 <= this.field47 + (long)this.field48) {
|
||||
var3 = this.field49 + (long)this.field50;
|
||||
} else if ((long)this.field48 + this.field47 > this.field49 && (long)this.field48 + this.field47 <= (long)this.field50 + this.field49) {
|
||||
var3 = this.field47 + (long)this.field48;
|
||||
}
|
||||
long var1 = -1L;
|
||||
long var3 = -1L;
|
||||
if (this.writeBufferOffset >= this.readBufferOffset && this.writeBufferOffset < this.readBufferOffset + (long)this.readBufferLength) {
|
||||
var1 = this.writeBufferOffset;
|
||||
} else if (this.readBufferOffset >= this.writeBufferOffset && this.readBufferOffset < this.writeBufferOffset + (long)this.writeBufferLength) {
|
||||
var1 = this.readBufferOffset;
|
||||
}
|
||||
|
||||
if (var1 > -1L && var3 > var1) {
|
||||
int var5 = (int)(var3 - var1);
|
||||
System.arraycopy(this.writeBuffer, (int)(var1 - this.field49), this.readBuffer, (int)(var1 - this.field47), var5);
|
||||
}
|
||||
if ((long)this.writeBufferLength + this.writeBufferOffset > this.readBufferOffset && this.writeBufferOffset + (long)this.writeBufferLength <= (long)this.readBufferLength + this.readBufferOffset) {
|
||||
var3 = this.writeBufferOffset + (long)this.writeBufferLength;
|
||||
} else if (this.readBufferOffset + (long)this.readBufferLength > this.writeBufferOffset && this.readBufferOffset + (long)this.readBufferLength <= this.writeBufferOffset + (long)this.writeBufferLength) {
|
||||
var3 = (long)this.readBufferLength + this.readBufferOffset;
|
||||
}
|
||||
|
||||
this.field49 = -1L;
|
||||
this.field50 = 0;
|
||||
}
|
||||
if (var1 > -1L && var3 > var1) {
|
||||
int var5 = (int)(var3 - var1);
|
||||
System.arraycopy(this.writeBuffer, (int)(var1 - this.writeBufferOffset), this.readBuffer, (int)(var1 - this.readBufferOffset), var5);
|
||||
}
|
||||
|
||||
}
|
||||
this.writeBufferOffset = -1L;
|
||||
this.writeBufferLength = 0;
|
||||
}
|
||||
|
||||
@ObfuscatedName("m")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(Ljava/net/Socket;IIB)Lfu;",
|
||||
garbageValue = "110"
|
||||
)
|
||||
public static AbstractSocket method2719(Socket var0, int var1, int var2) throws IOException {
|
||||
return new BufferedNetSocket(var0, var1, var2);
|
||||
}
|
||||
}
|
||||
|
||||
@ObfuscatedName("f")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(II)Ljava/lang/String;",
|
||||
garbageValue = "-792629541"
|
||||
)
|
||||
@Export("colorStartTag")
|
||||
static String colorStartTag(int color) {
|
||||
return "<col=" + Integer.toHexString(color) + ">";
|
||||
}
|
||||
@ObfuscatedName("e")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(III)I",
|
||||
garbageValue = "-1560259071"
|
||||
)
|
||||
static int method6528(int var0, int var1) {
|
||||
ItemContainer var2 = (ItemContainer)ItemContainer.itemContainers.get((long)var0);
|
||||
if (var2 == null) {
|
||||
return 0;
|
||||
} else if (var1 == -1) {
|
||||
return 0;
|
||||
} else {
|
||||
int var3 = 0;
|
||||
|
||||
@ObfuscatedName("er")
|
||||
@ObfuscatedSignature(
|
||||
signature = "(I)Llz;",
|
||||
garbageValue = "-1653835085"
|
||||
)
|
||||
@Export("getWorldMap")
|
||||
static WorldMap getWorldMap() {
|
||||
return class60.worldMap;
|
||||
}
|
||||
for (int var4 = 0; var4 < var2.quantities.length; ++var4) {
|
||||
if (var2.ids[var4] == var1) {
|
||||
var3 += var2.quantities[var4];
|
||||
}
|
||||
}
|
||||
|
||||
return var3;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user