Here you can find the source of toShort(Object prmIntObject)
public static short toShort(Object prmIntObject)
//package com.java2s; //License from project: Apache License public class Main { public static short toShort(Object prmIntObject) { short rtnInt16 = 0; if (prmIntObject != null) { if (prmIntObject.toString() != "") { rtnInt16 = Short.parseShort(prmIntObject.toString()); }/* w w w. j av a 2s .c o m*/ } return rtnInt16; } public static String toString(Object stringObject) { return toString(stringObject, ""); } public static String toString(Object stringObject, String value2) { if (stringObject != null) { return stringObject.toString(); } else { return value2; } } }