Class ByteUtil

java.lang.Object
com.predic8.membrane.core.util.ByteUtil

public class ByteUtil extends Object
  • Constructor Details

    • ByteUtil

      public ByteUtil()
  • Method Details

    • readByteArray

      public static byte[] readByteArray(InputStream in, int length) throws IOException
      Throws:
      IOException
    • getByteArrayData

      public static byte[] getByteArrayData(InputStream stream) throws IOException
      Throws:
      IOException
    • readStream

      public static void readStream(InputStream stream) throws IOException
      Throws:
      IOException
    • getDecompressedData

      public static byte[] getDecompressedData(byte[] compressedData) throws IOException
      Throws:
      IOException
    • getValueOfBits

      public static int getValueOfBits(byte b, int minBitPosition, int maxBitPosition)
    • getBitValueBigEndian

      public static boolean getBitValueBigEndian(byte b, int position)
    • getBitValue

      public static boolean getBitValue(byte b, int position, boolean isBigEndian)
    • setBitValue

      public static byte setBitValue(byte b, int position, boolean value, boolean isBigEndian)
    • setBitValueBigEndian

      public static byte setBitValueBigEndian(byte b, int position, boolean value)
    • setBitValues

      public static byte setBitValues(byte b, int beginning, int end, int value)
    • setBitValuesBigEndian

      public static byte setBitValuesBigEndian(byte b, int beginning, int end, int value)
    • getNumberOfBits

      public static int getNumberOfBits(int i)