Class BufferUtil
java.lang.Object
com.github.juliarn.npclib.ext.labymod.BufferUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull ByteBufferensureWriteable(@NotNull ByteBuffer buffer, int contentBytes) static byte[]extractData(@NotNull ByteBuffer buffer) static @NotNull ByteBufferputUUID(@NotNull ByteBuffer buffer, @NotNull UUID uuid) static @NotNull ByteBufferputVarInt(@NotNull ByteBuffer buffer, int value)
-
Field Details
-
VAR_INT_BYTE_LENGTHS
private static final int[] VAR_INT_BYTE_LENGTHS
-
-
Constructor Details
-
BufferUtil
private BufferUtil()
-
-
Method Details
-
ensureWriteable
@NotNull public static @NotNull ByteBuffer ensureWriteable(@NotNull @NotNull ByteBuffer buffer, int contentBytes) -
putUUID
@NotNull public static @NotNull ByteBuffer putUUID(@NotNull @NotNull ByteBuffer buffer, @NotNull @NotNull UUID uuid) -
putVarInt
@NotNull public static @NotNull ByteBuffer putVarInt(@NotNull @NotNull ByteBuffer buffer, int value) -
extractData
-