From 53c227008de0be9f1e79c26b45d1ea49a71ecb33 Mon Sep 17 00:00:00 2001 From: Konloch Date: Wed, 22 Nov 2023 14:16:48 -0700 Subject: [PATCH] Fix Missing Function Error https://www.morling.dev/blog/bytebuffer-and-the-dreaded-nosuchmethoderror/ --- .../main/java/com/konloch/socket/SocketServerIOHandler.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/konloch/socket/SocketServerIOHandler.java b/Core/src/main/java/com/konloch/socket/SocketServerIOHandler.java index 2168075..4eb322e 100644 --- a/Core/src/main/java/com/konloch/socket/SocketServerIOHandler.java +++ b/Core/src/main/java/com/konloch/socket/SocketServerIOHandler.java @@ -90,7 +90,7 @@ public void run() else client.setInputRead(false); - buffer.clear(); + ((java.nio.Buffer) buffer).clear(); //processing writing (only write when asked to) if (client.isOutputWrite()) @@ -119,7 +119,7 @@ public void run() buffer.put(bufferDump, offset, readMax); //flip the stored data - buffer.flip(); + ((java.nio.Buffer) buffer).flip(); //reset the network activity client.resetLastNetworkActivityWrite(); @@ -128,7 +128,7 @@ public void run() client.getSocket().write(buffer); //clear the buffer - buffer.clear(); + ((java.nio.Buffer) buffer).clear(); } else {