Here you can find the source of charToUnicodeLiteral(int value)
public static String charToUnicodeLiteral(int value)
//package com.java2s; /*/*from w ww. j a va2 s.c o m*/ * Fernflower - The Analytical Java Decompiler * http://www.reversed-java.com * * (C) 2008 - 2010, Stiver * * This software is NEITHER public domain NOR free software * as per GNU License. See license.txt for more details. * * This software is distributed WITHOUT ANY WARRANTY; without * even the implied warranty of MERCHANTABILITY or FITNESS FOR * A PARTICULAR PURPOSE. */ public class Main { public static String charToUnicodeLiteral(int value) { String sTemp = Integer.toHexString(value); sTemp = ("0000" + sTemp).substring(sTemp.length()); return "\\u" + sTemp; } }