Class IOUtil

java.lang.Object
com.diozero.util.IOUtil

public class IOUtil
extends Object
  • Field Details

    • DEFAULT_BYTE_ORDER

      public static final ByteOrder DEFAULT_BYTE_ORDER
  • Constructor Details

    • IOUtil

      public IOUtil()
  • Method Details

    • asInt

      public static int asInt​(byte b)
      Get an unsigned int value from a signed byte
      Parameters:
      b - input value
      Returns:
      byte values from -127..128 convert 128..255
    • getShort

      public static short getShort​(ByteBuffer buffer)
    • getShort

      public static short getShort​(ByteBuffer buffer, ByteOrder order)
    • getUShort

      public static int getUShort​(ByteBuffer buffer)
    • getUShort

      public static int getUShort​(ByteBuffer buffer, ByteOrder order)
    • getUInt

      public static long getUInt​(ByteBuffer buffer)
    • getUInt

      public static long getUInt​(ByteBuffer buffer, ByteOrder order)
    • getUInt

      public static long getUInt​(ByteBuffer buffer, int length)
    • getUInt

      public static long getUInt​(ByteBuffer buffer, int length, ByteOrder order)