Here you can find the source of toUnicode(String value)
public static String toUnicode(String value)
//package com.java2s; /******************************************************************************* * Copyright ? 2001, 2007 IBM Corporation 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 * /*from ww w . j a v a 2 s .c o m*/ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ public class Main { public static String toUnicode(String value) { if (value == null) { return value; } String result = ""; //$NON-NLS-1$ for (int i = 0; i < value.length(); i++) { char character = value.charAt(i); if (character == '>') { result += ">"; //$NON-NLS-1$ } else if (character == '<') { result += "<"; //$NON-NLS-1$ } else { result += character; } } //System.out.println(value + " " + result); return result; } }