Here you can find the source of appendHex(int color, StringBuffer buffer)
protected static void appendHex(int color, StringBuffer buffer)
//package com.java2s; /******************************************************************************* * Copyright (c) 2012 Sierra Wireless and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors:/*from w ww . j a va2s.com*/ * Sierra Wireless - initial API and implementation *******************************************************************************/ public class Main { protected static void appendHex(int color, StringBuffer buffer) { String string = Integer.toHexString(color).toUpperCase(); if (string.length() == 1) { buffer.append("0"); //$NON-NLS-1$ } buffer.append(string); } }