Class MsgUtil

java.lang.Object
alexiil.mc.lib.net.MsgUtil

public final class MsgUtil extends Object
Various utilities for reading and writing data
  • Method Details

    • writeUTF

      public static void writeUTF(NetByteBuf buffer, String string)
    • readUTF

      public static String readUTF(NetByteBuf buffer)
    • 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)
    • appendBufferData

      public static void appendBufferData(io.netty.buffer.ByteBuf buffer, int offset, int length, StringBuilder sb, String linePrefix, int readerIndex)