Here you can find the source of objectToString(Object o)
public static String objectToString(Object o)
//package com.java2s; //License from project: Apache License public class Main { public static String objectToString(Object o) { if (o == null) { return ""; }/*ww w . jav a 2 s . co m*/ try { return o.toString(); } catch (Exception e) { return "Exception converting object to string FormatUtils.objectToString(): " + e.getMessage(); } } }