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 voidappendBufferData(io.netty.buffer.ByteBuf buffer, int length, StringBuilder sb, String linePrefix, int readerIndex)static voidensureEmpty(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 voidprintWholeBuffer(io.netty.buffer.ByteBuf buf)static StringreadUTF(NetByteBuf buffer)static voidwriteUTF(NetByteBuf buffer, String string)
-
Method Details
-
writeUTF
-
readUTF
-
ensureEmpty
public static void ensureEmpty(io.netty.buffer.ByteBuf buf, boolean throwError, String extra) throws InvalidInputDataExceptionChecks 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)
-