code: public static Short extractToShort(final DeviceAttribute deviceAttributeRead) throws DevFailed {
  	final Object value = AttributeHelper.extract(deviceAttributeRead);
  	Short argout = null;
  	if (value instanceof Short) {
  	    argout = (Short) value;
  	} else if (value instanceof String) {
  	    try {
  		argout = Short.valueOf((String) value);
  	    } catch (final Exception e) {
  		Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value
  			+ " is not a numerical",
  			"AttributeHelper.extractToShort(deviceAttributeWritten)");
  	    }
  	} else if (value instanceof Integer) {
  	    argout = Short.valueOf(((Integer) value).shortValue());
  	} else if (value instanceof Long) {
  	    argout = Short.valueOf(((Long) value).shortValue());
  	} else if (value instanceof Float) {
  	    argout = Short.valueOf(((Float) value).shortValue());
  	} else if (value instanceof Boolean) {
  	    if (((Boolean) value).booleanValue()) {
  		argout = Short.valueOf((short) 1);
  	    } else {
  		argout = Short.valueOf((short) 0);
  	    }
  	} else if (value instanceof Double) {
  	    argout = Short.valueOf(((Double) value).shortValue());
  	} else if (value instanceof DevState) {
  	    argout = Short.valueOf(Integer.valueOf(((DevState) value).value()).shortValue());
  	} else {
  	    Except.throw_exception("TANGO_WRONG_DATA_ERROR", "output type " + value.getClass()
  		    + " not supported",
  		    "AttributeHelper.extractToShort(Object value,deviceAttributeWritten)");
  	}
  
  	return argout;
      }
docs: Extract data from DeviceAttribute to a Short
  
  @param deviceAttributeRead
  the DeviceAttribute attribute to read
  @return Short, the result in Short format
  @throws DevFailed