code: public static Short toShort(Object o, Short defaultValue) {
  	if (o instanceof Short) return (Short) o;
  	if (defaultValue != null) return Short.valueOf(toShortValue(o, defaultValue.shortValue()));
  	short res = toShortValue(o, Short.MIN_VALUE);
  	if (res == Short.MIN_VALUE) return defaultValue;
  	return Short.valueOf(res);
      }
docs: cast a Object to a Byte Object(reference type)
  
  @param o Object to cast
  @param defaultValue
  @return casted Byte Object