mirror of
https://github.com/Eaglercraft-Archive/Eaglercraftx-1.8.8-src.git
synced 2025-06-27 18:38:14 -05:00
Update #24 - 1000s of optimizations, shared worlds on desktop
This commit is contained in:
@ -71,4 +71,19 @@ public class IOUtils {
|
||||
}
|
||||
}
|
||||
|
||||
public static int readFully(InputStream is, byte[] out) throws IOException {
|
||||
int i = 0, j;
|
||||
while(i < out.length && (j = is.read(out, i, out.length - i)) != -1) {
|
||||
i += j;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
public static long skipFully(InputStream is, long skip) throws IOException {
|
||||
long i = 0, j;
|
||||
while(i < skip && (j = is.skip(skip - i)) != 0) {
|
||||
i += j;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user