Java tutorial
//package com.java2s; /******************************************************************************* * Copyright (c) 2011 Greg Riccardi, Guillaume Jimenez. * All rights reserved. This program and the accompanying materials * are made available under the terms of the GNU Public License v2.0 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html * * Contributors: * Greg Riccardi - initial API and implementation * Guillaume Jimenez - initial API and implementation ******************************************************************************/ public class Main { public static String IMAGE_SERVER = "http://images.morphbank.net/"; public static String getImageURL(int localId) { return getImageURL(localId, "thumb"); } public static String getImageURL(int localId, String imageType) { return getImageURL(Integer.toString(localId), imageType); } public static String getImageURL(String localId, String imageType) { // return MORPHBANK_SERVER + imageType + "/" + localId + ".jpg"; return IMAGE_SERVER + "?id=" + localId + "&imgType=" + imageType; } }