Class MathHelper

java.lang.Object
io.github.kosmx.emotes.common.tools.MathHelper

public class MathHelper extends Object
  • Constructor Details

    • MathHelper

      public MathHelper()
  • Method Details

    • readFromIStream

      public static ByteBuffer readFromIStream(InputStream stream) throws IOException
      Throws:
      IOException
    • safeGetBytesFromBuffer

      public static byte[] safeGetBytesFromBuffer(ByteBuffer byteBuffer)
      If ByteBuffer is wrapped, it is safe to get the array but if is direct manual read is required.
      Parameters:
      byteBuffer - get the bytes from
      Returns:
      the byte array
    • readBytes

      public static byte[] readBytes(io.netty.buffer.ByteBuf buf)