diff options
author | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-04-25 13:12:22 +0100 |
---|---|---|
committer | nextdaydelivery <79922345+nxtdaydelivery@users.noreply.github.com> | 2022-04-25 13:12:22 +0100 |
commit | 89d6576a7777a2949e04b2c6c8d2eb015a733529 (patch) | |
tree | 1a6906f9c71591aacbcbf5a32a1a1ed582b95fcb /src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java | |
parent | 29156d83c4213e319149fa5e0a926dd913404528 (diff) | |
download | OneConfig-89d6576a7777a2949e04b2c6c8d2eb015a733529.tar.gz OneConfig-89d6576a7777a2949e04b2c6c8d2eb015a733529.tar.bz2 OneConfig-89d6576a7777a2949e04b2c6c8d2eb015a733529.zip |
add size, do some config element stuff, fixes for cards, finish mods page and performance page, cleanup and some more
Diffstat (limited to 'src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java')
-rw-r--r-- | src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java b/src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java index f5105fb..2127251 100644 --- a/src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java +++ b/src/main/java/io/polyfrost/oneconfig/lwjgl/IOUtil.java @@ -7,6 +7,7 @@ import java.net.URL; import java.nio.Buffer; import java.nio.ByteBuffer; import java.nio.ByteOrder; +import java.nio.file.Files; public final class IOUtil { @@ -15,7 +16,7 @@ public final class IOUtil { /** * Taken from legui under MIT License - * https://github.com/SpinyOwl/legui/blob/develop/LICENSE + * <a href="https://github.com/SpinyOwl/legui/blob/develop/LICENSE">https://github.com/SpinyOwl/legui/blob/develop/LICENSE</a> */ @SuppressWarnings("RedundantCast") public static ByteBuffer resourceToByteBuffer(String path) throws IOException { @@ -27,7 +28,7 @@ public final class IOUtil { InputStream stream; File file = new File(path); if (file.exists() && file.isFile()) { - stream = new FileInputStream(file); + stream = Files.newInputStream(file.toPath()); } else { stream = IOUtil.class.getResourceAsStream(path); } |