code: public static void writeInt(byte[] b, int offset, int value) {
      b[offset++] = (byte) (value >>> 24);
      b[offset++] = (byte) (value >>> 16);
      b[offset++] = (byte) (value >>> 8);
      b[offset] = (byte)value;
    }
docs: Serializes an int into a byte array at a specific offset in big-endian order
  
  @param b byte array in which to write an int value.
  @param offset offset within byte array to start writing.
  @param value int to write to byte array.