Here you can find the source of buildURL(int imageId)
public static String buildURL(int imageId)
//package com.java2s; //License from project: Apache License public class Main { public static final String SUFFIX_SMALL = "214x261.jpg"; public static String STARS_SERVICE_PREFIX = "http://raymcompreviewprod"; public static String buildURL(int imageId) { StringBuilder builder = new StringBuilder("/"); for (int i = 1; i < 9; i++) { builder.append(imageId % (int) Math.pow(10, i) / (int) Math.pow(10, i - 1)); if ((i % 2) == 0) { builder.append("/"); }// w w w . j a v a 2 s .c o m } return STARS_SERVICE_PREFIX + String.format("%sfinal/%d-" + SUFFIX_SMALL, builder.reverse().toString(), imageId); } }