class BytesUtils {

  public static int getByteN(byte data, int offset) {
    offset %= 8;
    if (((0xff & data) & (1 << (7 - offset))) != 0) {
      return 1;
    } else {
      return 0;
    }
  }

  private  BytesUtils();

}