public String getByKey ( String key ) { String out = "" ; if ( key . equals ( "time" ) ) return time ( ) ; if ( key . contains ( "Time" ) ) { DateFormat dfm = new SimpleDateFormat ( "HH:mm:ss" ) ; dfm . setTimeZone ( TimeZone . getTimeZone ( timezone ) ) ; out = dfm . format ( Long . parseLong ( String . valueOf ( this . datapoint . get ( key ) ) ) * 1000 ) ; } else out = String . valueOf ( datapoint . get ( key ) ) ; return out ; }
Return the data point field with the corresponding key