Update #45 - Fixed various issues with the client

This commit is contained in:
lax1dude
2024-12-14 20:54:34 -08:00
parent 12535d429f
commit 346047cf24
39 changed files with 571 additions and 208 deletions

View File

@ -142,6 +142,16 @@ public class EaglerInputStream extends InputStream {
}
}
public static byte[] inputStreamToBytesNoClose(InputStream is) throws IOException {
EaglerOutputStream os = new EaglerOutputStream(1024);
byte[] buf = new byte[1024];
int i;
while ((i = is.read(buf)) != -1) {
os.write(buf, 0, i);
}
return os.toByteArray();
}
public byte[] getAsArray() {
if (pos == 0 && count == buf.length) {
return buf;