public static < T > T deserializeValue ( byte [ ] serializedValue , TypeSerializer < T > serializer ) throws IOException { if ( serializedValue == null ) { return null ; } else { final DataInputDeserializer deser = new DataInputDeserializer ( serializedValue , 0 , serializedValue . length ) ; final T value = serializer . deserialize ( deser ) ; if ( deser . available ( ) > 0 ) { throw new IOException ( "Unconsumed bytes in the deserialized value. " + "This indicates a mismatch in the value serializers " + "used by the KvState instance and this access." ) ; } return value ; } }
Deserializes the value with the given serializer .