public byte[] Int32ToByte4(Integer value) {
    byte[] result = new byte[4];
    /*** forward algorithm [123][0][0][0] ***/
    byte i = 0, j = 0;
    while(true) {
      result[j] = (byte)((value >> (i*8)) & 0xff);
      if (j == 3) break;
      j++;
      i++;
    }
    return result;
    
    /*** inverse algorithm 0 0 0 123 ***
    byte tmpI = 3;
    int tmpJ = 0;
    while(true) {
      tmpResult[tmpJ] = (byte)((aInteger >> (tmpI*8)) & 0xff);
      if (tmpJ == 3) break;
      tmpJ++;
      tmpI--;
    }
    return tmpResult;
    ***************************/
  }