fun <T> fromBytes(value: ByteArray?, clazz: Class<T>): T { return try { val input = Input(ByteArrayInputStream(value)) clazz.cast(kryo.get().readClassAndObject(input)) } catch (t: Throwable) { LOG.error("Unable to deserialize because " + t.message, t) throw t } }
Deserialize a profile measurement 's value . The value produced by a Profile definition can be any numeric data type . The data type depends on how the profile is defined by the user . The user should be able to choose the data type that is most suitable for their use case .