Don't use streams as they're lower performance for our use cases.

Some minor reformating too.
This commit is contained in:
dordsor21
2019-02-20 14:50:49 +00:00
parent d0a4465985
commit 350e151214
6 changed files with 17 additions and 13 deletions

View File

@ -154,7 +154,8 @@ public class NbtFactory {
* @return The decoded NBT compound.
* @throws IOException If anything went wrong.
*/
@SuppressWarnings({"IOResourceOpenedButNotSafelyClosed", "resource"}) public static NbtCompound fromStream(InputStream input, StreamOptions option)
@SuppressWarnings({"IOResourceOpenedButNotSafelyClosed", "resource"})
public static NbtCompound fromStream(InputStream input, StreamOptions option)
throws IOException {
DataInputStream data = null;
boolean suppress = true;
@ -527,7 +528,9 @@ public class NbtFactory {
*
* @author Kristian
*/
public enum StreamOptions {NO_COMPRESSION, GZIP_COMPRESSION,}
public enum StreamOptions {
NO_COMPRESSION, GZIP_COMPRESSION,
}
private enum NbtType {