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 ByteBufferputBytes(@NotNull ByteBuffer buffer, byte[] bytes) static @NotNull ByteBufferputString(@NotNull ByteBuffer buffer, @NotNull String string) 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) -
putString
@NotNull public static @NotNull ByteBuffer putString(@NotNull @NotNull ByteBuffer buffer, @NotNull @NotNull String string) -
putBytes
@NotNull public static @NotNull ByteBuffer putBytes(@NotNull @NotNull ByteBuffer buffer, byte[] bytes) -
putVarInt
@NotNull public static @NotNull ByteBuffer putVarInt(@NotNull @NotNull ByteBuffer buffer, int value) -
extractData
-