Package alexiil.mc.lib.net
Class MsgUtil
java.lang.Object
alexiil.mc.lib.net.MsgUtil
Various utilities for reading and writing data
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
appendBufferData
(io.netty.buffer.ByteBuf buffer, int length, StringBuilder sb, String linePrefix, int readerIndex) static void
ensureEmpty
(io.netty.buffer.ByteBuf buf, boolean throwError, String extra) Checks to make sure that this buffer has been *completely* read (so that there are no readable bytes left overstatic void
printWholeBuffer
(io.netty.buffer.ByteBuf buf) static String
readUTF
(NetByteBuf buffer) static void
writeUTF
(NetByteBuf buffer, String string)
-
Method Details
-
writeUTF
-
readUTF
-
ensureEmpty
public static void ensureEmpty(io.netty.buffer.ByteBuf buf, boolean throwError, String extra) throws InvalidInputDataException Checks to make sure that this buffer has been *completely* read (so that there are no readable bytes left over- Throws:
InvalidInputDataException
-
printWholeBuffer
public static void printWholeBuffer(io.netty.buffer.ByteBuf buf) -
appendBufferData
public static void appendBufferData(io.netty.buffer.ByteBuf buffer, int length, StringBuilder sb, String linePrefix, int readerIndex)
-